
AP Computer Science Principles Quiz
Quiz
•
Computers
•
10th Grade
•
Practice Problem
•
Hard
Milan Bozic
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to declare a variable in JavaScript?
`var myVariable;`
`int myVariable;`
`declare myVariable;`
`variable myVariable;`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid data type in JavaScript?
`integer`
`string`
`character`
`decimal`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output? `console.log(typeof 42);`
`number`
`string`
`boolean`
`undefined`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a control structure used for decision making in JavaScript?
`for`
`if`
`while`
`switch`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet? ```javascript let x = 5; x += 3; console.log(x); ```
`5`
`8`
`3`
`15`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to define a constant in JavaScript?
`var`
`let`
`const`
`static`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output? `console.log(2 + "2");`
`4`
`22`
`NaN`
`undefined`
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
13 questions
Five Nights At Freddy's: Security Breach Quiz
Quiz
•
KG - Professional Dev...
20 questions
Software
Quiz
•
10th Grade
13 questions
Networks - Introduction
Quiz
•
10th Grade
10 questions
UNIT 2.4 LOGIC
Quiz
•
10th Grade
20 questions
Q1 M3 PRE-TEST
Quiz
•
10th Grade
10 questions
Innovations of Technology
Quiz
•
7th - 10th Grade
15 questions
Chapter 8 by PD
Quiz
•
10th Grade
20 questions
Quiz
•
7th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
