wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CodeHS Animation Quiz

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which symbol represents and in JavaScript?

a)

&&

b)

!

c)

==

d)

||

2.

Which symbol represents or in JavaScript?

a)

||

b)

&&

c)

>

d)

!

3.

What means that two values are equal in Boolean?

a)

++

b)

==

c)

=

d)

>=

4.

Which means is not equal?

a)

=!

b)

||

c)

!=

d)

++!

5.

Which returns a random number between 1 and 55?

a)

randomInt(1, 55)

b)

randInt(1, 55)

c)

Randomizer.int(1, 55)

d)

Randomizer.netInt(1, 55)

6.

Which statement will end a loop?

a)

break

b)

else

c)

if

d)

if else

7.

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 "

8.

What is a variable

a)

Store values in containers so we can use them later.

b)

Store values in containers so we can use them never.

c)

Store values in containers so we can use them once.

d)

Store values in containers so we can't use them later.

9.

A short form writing the word variable is

a)

rav

b)

VAR

c)

var

d)

varia

10.

What is the symbol used for the INCREMENT operator in JS?

a)

+

b)

++

c)

=

d)

==

11.

Conditions return values of which data type?

a)

Integer

b)

boolean

c)

floating-point

d)

string

12.

This loop can only be used when the programmer knows the number of times a code is to be repeated

a)

while

b)

for

c)

do while

d)

repeat until

13.
The conditional statement, in Javascript, begins with the word _______.
a)
Then
b)
Else
c)
If
d)
OK
14.

What is a "bug" in programming?

a)

an error in code

b)

finding and fixing errors in coding

c)

a network

d)

a broken computer

15.

Why do we use if/else statements in Java?

a)

To repeat something for a fixed number of times

b)

To either do something if a condition is true or do something else

c)

To break out of some block of code

d)

To repeat something while a condition is true

16.

sets the number of milliseconds something will be drawn or executed

a)

setTimer

b)

variable

c)

constant

d)

increment

17.

A variable that is before the lines of code and that allow many functions within the program to reference

a)

global variable

b)

constant

c)

variable

d)

function

18.

ballX - radius

a)

Left side of the ball

b)

right side of the ball

c)

bottom of the ball

d)

top of the ball

19.

A method that gets called by your program in response to some event

a)

callback function

b)

constant

c)

if/else statement

d)

for loop

20.

What statement can we use inside of a loop to end it?

a)

break

b)

end

c)

if statement

d)

timer