
AP Computer Science Principles Pre-Test

Quiz
•
Information Technology (IT)
•
10th Grade
•
Medium
Ethan Batres
Used 4+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
28 questions
7.2.2 - 7.2.3 Iteration Quizizz Extra Practice

Quiz
•
10th Grade
25 questions
Quizizz JavaScript Attempt 2 Review

Quiz
•
9th - 12th Grade
25 questions
Visual Basic for Applications

Quiz
•
10th Grade
27 questions
PRACTICE TEST FOR 4TH QUARTER - TLE ICT 10

Quiz
•
10th Grade - University
30 questions
Electricity Safety Quiz

Quiz
•
9th Grade - University
30 questions
Python Programming Quiz

Quiz
•
9th - 12th Grade
30 questions
Quiz on Application and System Software

Quiz
•
10th Grade
30 questions
Test10

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
10 questions
Exploring Newton's Laws of Motion

Interactive video
•
6th - 10th Grade
20 questions
Cell organelles and functions

Quiz
•
10th Grade
10 questions
Colonial Grievances Against the King Quiz

Quiz
•
10th Grade
13 questions
BizInnovator Startup - Experience and Overview

Quiz
•
9th - 12th Grade