wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JavaScript Operators & Expressions – Day 2 Quiz (20 MCQs)

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

What is the output of 5 + 3 * 2?

a)

16

b)

11

c)

10

d)

13

2.

Which operator is used for exponentiation in JavaScript?

a)

^

b)

**

c)

exp()

d)

pow()

3.

Which operator checks both value and type equality?

a)

==

b)

!=

c)

===

d)

=

4.

What is the output of 10 % 3?

a)

3

b)

1

c)

0

d)

10

5.

The result of typeof(10 + "5") is:

a)

"number" 

b)

"string" 

c)

"object" 

d)

"undefined"

6.

What does a += 5 mean?

a)

a = a + 5

b)

a = a - 5

c)

a = 5

d)

a = 5 + 5

7.

Which of the following is not a comparison operator?

a)

>=

b)

!=

c)

&&

d)

<

8.

What is the output of "5" == 5 and "5" === 5?

a)

true, true

b)

false, true

c)

true, false

d)

false, false

9.

Which operator is used for logical AND?

a)

||

b)

&&

c)

&

d)

AND

10.

What will be printed?

a)

true

b)

false

c)

undefined

d)

Error

11.

What is the output of the code?

a)

25

b)

10

c)

15

d)

20

12.

What is the output of !(5 > 2)?

a)

true

b)

false

c)

undefined

d)

NaN

13.

What will be printed?

a)

A

b)

B

c)

true

d)

false

14.

What is the value of this expression?

a)

9

b)

12

c)

18

d)

6

15.

What is the output of the following?

a)

22

b)

2

c)

20

d)

NaN

16.

What is the output of:

a)

2

b)

true

c)

false

d)

NaN

17.

Evaluate this:

a)

true

b)

false

c)

Error

d)

undefined

18.

What will be printed?

a)

Hello ${name}

b)

Hello name

c)

Hello John

d)

Error

19.

Which of the following has highest precedence?

a)

*

b)

+

c)

()

d)

&&

20.

What is the result of:

a)

38

b)

58

c)

83

d)

8

e)

88