
AP Computer Science Principles Pre-Test
Quiz
•
Information Technology (IT)
•
10th Grade
•
Practice Problem
•
Medium
Ethan Batres
Used 6+ times
FREE Resource
Enhance your content in a minute
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid way to declare a variable in JavaScript?
`var myVariable;`
`variable myVariable;`
`declare myVariable;`
`int myVariable;`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
var x = 5;
var y = 10;
console.log(x + y);
15
510
5
10
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a function declaration in JavaScript?
`function myFunction() {}`
`let myFunction = function() {}`
`const myFunction = () => {}`
`myFunction() = function() {}`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a variable declared with `var` inside a function?
Global
Local to the function
Local to the block
Local to the script
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code:
function add(a, b) {
return a + b;
}
What will `add(3, 4)` return?
34
7
12
undefined
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid way to create a list (array) in JavaScript?
`var myList = {};`
`var myList = [];`
`let myList = ();`
`let myList = <>;`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
var fruits = ['apple', 'banana', 'cherry'];
console.log(fruits[1]);
apple
banana
cherry
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
25 questions
Role of Banks Quiz
Quiz
•
10th Grade
25 questions
CSS Font Property Quizziz
Quiz
•
6th Grade - University
28 questions
Tech+ 3.3 Questions
Quiz
•
10th Grade
32 questions
Final Quiz Pemrograman C++
Quiz
•
10th Grade
31 questions
AP CSP Unit 1 Exam
Quiz
•
10th Grade
35 questions
Computer Hardware Quiz
Quiz
•
9th - 12th Grade
25 questions
Ujian MID Informatika Semester Genap 2024-2025
Quiz
•
10th Grade
25 questions
HTML Attempt 2 Review
Quiz
•
9th - 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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
15 questions
Main Idea and Supporting Details.
Quiz
•
4th - 11th Grade
20 questions
Cell Organelles
Quiz
•
10th Grade
25 questions
Complementary and Supplementary Angles
Quiz
•
7th - 10th Grade
12 questions
Add and Subtract Polynomials
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
10 questions
Exploring the Layers of the Earth
Interactive video
•
6th - 10th Grade
