wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CS Do Now Quiz #5

Total questions: 12

Worksheet time: 7mins

Name
Class
Date
1.

What keyword would a person use to declare a variable in which the value stored to it is expected to not be changed or updated?

4 lines
2.

What type of variable is expressed as true/false?

a)

String

b)

Boolean

c)

Number

d)

Conditional

3.

What operator can be used with both strings and numbers?

a)

"-"

b)

"/"

c)

"+"

d)

"*"

4.

What is the result of 12 % 512\ \%\ 5  ?

a)

2

b)

17

c)

60

d)

7

5.

Which of these is NOT a valid string?

a)

Hello

b)

"work4$"

c)

"Hello, world!"

d)

"dude'

6.

What is the difference between loose equality (==) and strict equality (===)?

4 lines
7.

What will this boolean expression resolve to? --

"23" < "123"

a)

true

b)

false

8.

Which of these characters can be included in a string?

a)

Alphabetical (a-z, A-Z)

b)

Digits (0-9)

c)

Spaces

d)

Special Characters (!/$^*, etc.)

e)

all of the above

9.
What surrounds a string?
a)

Quotations:

" " or ' '

b)

Curly Brackets:

{ }

c)

Parentheses:

( )

d)

Square Brackets:

[ ]

10.

In this code snippet:

```

var thing;

console.log(thing);

```

What is the value of "thing"?

a)

null

b)

"thing"

c)

undefined

d)

""

11.

What is the output for this code?

a)

The value of z is z

b)

The value of z is 11

c)

The value of z is: 11

d)

The value of z is: x + y

12.

How do you write "Hello World" in an alert box?

a)

msg("Hello World");

b)

alertBox("Hello World");

c)

alert("Hello World");

d)

msgBox("Hello World");