AP Computer Science Principles Pre-Test

AP Computer Science Principles Pre-Test

10th Grade

•

30 Qs

quiz-placeholder

Similar activities

PAS DART RPL

PAS DART RPL

9th - 12th Grade

•

25 Qs

Tech+ 5.4 Questions

Tech+ 5.4 Questions

10th Grade

•

28 Qs

EVALUASI TENGAH SEMESTER GENAP

EVALUASI TENGAH SEMESTER GENAP

10th Grade - University

•

30 Qs

Foundations of Computing: Final Review  - Part 1

Foundations of Computing: Final Review - Part 1

10th Grade

•

31 Qs

X_INFORMATIKA

X_INFORMATIKA

10th Grade

•

25 Qs

Subnetting and Network Address Worksheet

Subnetting and Network Address Worksheet

10th Grade

•

25 Qs

The End

The End

9th - 12th 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?