
AP Computer Science Principles Pre-Test

Flashcard
•
Information Technology (IT)
•
10th Grade
•
Hard
Quizizz Content
FREE Resource
Student preview

28 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Which of the following is a valid way to declare a variable in JavaScript?
Options: `var myVariable;`, `variable myVariable;`, `declare myVariable;`, `int myVariable;`
Back
`var myVariable;`
2.
FLASHCARD QUESTION
Front
What will be the output of the following code snippet? var x = 5; var y = 10; console.log(x + y);
Back
15
3.
FLASHCARD QUESTION
Front
Which of the following is a function declaration in JavaScript?
Options: `function myFunction() {}` , `let myFunction = function() {}` , `const myFunction = () => {}` , `myFunction() = function() {}`
Back
`function myFunction() {}`
4.
FLASHCARD QUESTION
Front
What is the scope of a variable declared with `var` inside a function?
Back
Local to the function
5.
FLASHCARD QUESTION
Front
What will `add(3, 4)` return?
Back
7
6.
FLASHCARD QUESTION
Front
Which of the following is a valid way to create a list (array) in JavaScript? Options: `var myList = {};`, `var myList = [];`, `let myList = ();`, `let myList = <>;`
Back
`var myList = [];`
7.
FLASHCARD QUESTION
Front
What will be the output of the following code?
var fruits = ['apple', 'banana', 'cherry'];
console.log(fruits[1]);
Back
banana
Create a free account and access millions of resources
Similar Resources on Wayground
23 questions
CSP Unit 6 Review

Flashcard
•
12th Grade
23 questions
CSP Unit 6 Review

Flashcard
•
12th Grade
22 questions
Java Programming Flashcard - unit 1b

Flashcard
•
9th Grade
19 questions
cs-p Unit 4 Flashcard1

Flashcard
•
9th - 12th Grade
21 questions
AP CSP Unit 3 Review

Flashcard
•
11th Grade
23 questions
AP CSP Unit 4 Test REVIEW

Flashcard
•
11th Grade
18 questions
Code.org CSP Unit 4 Review (23-24)

Flashcard
•
9th - 12th Grade
25 questions
JavaScript Console & Graphics Review

Flashcard
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Hersheys' Travels Quiz (AM)

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
17 questions
MIXED Factoring Review

Quiz
•
KG - University
10 questions
Laws of Exponents

Quiz
•
9th Grade
10 questions
Characterization

Quiz
•
3rd - 7th Grade
10 questions
Multiply Fractions

Quiz
•
6th Grade