AP Computer Science Principles Pre-Test

AP Computer Science Principles Pre-Test

10th Grade

•

30 Qs

quiz-placeholder

Similar activities

Excel Quiz

Excel Quiz

4th Grade - University

•

25 Qs

G4 - Exploring Internet (Researching) - T2 (AY 2025-2026)

G4 - Exploring Internet (Researching) - T2 (AY 2025-2026)

4th Grade - University

•

25 Qs

ASAS I

ASAS I

8th Grade - University

•

25 Qs

Data Preparation and Annotation

Data Preparation and Annotation

9th - 12th Grade

•

25 Qs

Code HS Computer SCi 114.1.1 JavaScript Final Exam Pt. 1

Code HS Computer SCi 114.1.1 JavaScript Final Exam Pt. 1

9th - 12th Grade

•

25 Qs

QUIZ TIK EXCEL

QUIZ TIK EXCEL

10th Grade - University

•

25 Qs

Cryptography and Ciphers Redo 2

Cryptography and Ciphers Redo 2

9th - 12th Grade

•

25 Qs

Tes Hardware

Tes Hardware

10th Grade

•

25 Qs

AP Computer Science Principles Pre-Test

AP Computer Science Principles Pre-Test

Assessment

Quiz

•

Information Technology (IT)

•

10th Grade

•

Practice Problem

•

Medium

Created by

Ethan Batres

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?