AP Computer Science Principles Quiz

AP Computer Science Principles Quiz

10th Grade

15 Qs

quiz-placeholder

Similar activities

C# lesson10

C# lesson10

1st - 10th Grade

10 Qs

Arrays, 2D Arrays, and ArrayLists

Arrays, 2D Arrays, and ArrayLists

9th - 12th Grade

15 Qs

ASJ_XII_UH1

ASJ_XII_UH1

1st - 12th Grade

15 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

Quiz 1.2 Operating system

Quiz 1.2 Operating system

10th Grade

10 Qs

ระบบทางเทคโนโลยี ม.4

ระบบทางเทคโนโลยี ม.4

10th Grade - University

10 Qs

Quiz Informatika Bab 3 & 4

Quiz Informatika Bab 3 & 4

10th Grade

20 Qs

Coding helps to Understand

Coding helps to Understand

6th - 10th Grade

10 Qs

AP Computer Science Principles Quiz

AP Computer Science Principles Quiz

Assessment

Quiz

Computers

10th Grade

Practice Problem

Hard

Created by

Milan Bozic

FREE Resource

AI

Enhance your content in a minute

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

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`

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?