wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

JavaScript Quiz

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What programming language did we learn in class this week?

a)

Karel

b)

Java

c)

JavaScript

d)

Visual Basic

2.

Which of these is a loop?

a)

if(x<10)

b)

while(x<10)

c)

var x=10;

d)

text(x,10;10)

3.

Which command provides a random color?

a)

Randomizer.color

b)

Randomizer.nextColor()

c)

RandColor;

d)

nextColor.Randomizer()

4.

Which of these will increase the value of the variable X?

a)

increment (x)

b)

x++;

c)

x=x;

d)

x+1;

5.

Which of the following will decrease the value of x?

a)

x--;

b)

x-1;

c)

x=x;

d)

x=-x;

6.

Greater than or equal to

a)

> or =

b)

> || =

c)

>=

d)

<=

7.

His name is Fred and he is less than 16 years old

a)

if (name = "fred" && age < 16 )

b)

if (name === "fred" && age < 16 )

c)

if (name = "fred" || age < 16 )

d)

if (name === "fred" || age < 16 )

8.

Repeat something 10 times

a)

repeat 10

b)

for (var i=0; i<10; i++)

c)

repeat { } until 10;

d)

while (i = 10)

9.

When we are done with a line what do we put at the end?

a)

a colon :

b)

a semi-colon ;

c)

a period .

d)

a quotation mark "

10.

When we surround a word with quotes "David" it's called ?

a)

a program

b)

a loop

c)

a string

d)

a command