
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`
Create a free account and access millions of resources
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
20 questions
Python Recap
Quiz
•
7th Grade - University
15 questions
Lua Review Corona SDK with Notepad++
Quiz
•
10th - 12th Grade
10 questions
STM BTEC DIT 3- 5. Maintenance, set-up, performance p152
Quiz
•
9th - 11th Grade
15 questions
HTML
Quiz
•
8th - 12th Grade
10 questions
Q1 M 2 - TOPIC 2 / Check your understanding
Quiz
•
10th Grade
20 questions
From Binary To Denary Conversion - IGCSE
Quiz
•
7th Grade - Professio...
10 questions
J808 LO1.1 Advantages of following a project life cycle
Quiz
•
10th Grade
15 questions
History of Computers
Quiz
•
6th - 12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
