menu

JavaScript Operators


1. Which operator is used for subtraction in JavaScript?

+

-

*

/


2. What is the result of typeof "hello" in JavaScript?

number

string

boolean

undefined


3. What is the result of 2 >= 2 in JavaScript?

1

0

1

0


4. What is the result of --i when i is 3 in JavaScript?

2

3

4

undefined


5. What is the result of true + 2 in JavaScript?

3

3

1

NaN


6. What is the result of true && false in JavaScript?

1

0

1

0


7. What is the result of !(true || false) in JavaScript?

1

0

null

undefined


8. What is the result of 2 ** 3 in JavaScript?

6

8

9

10


9. What is the result of 2 != "2" in JavaScript?

1

0

null

undefined


10. What is the result of (true && false) in JavaScript?

1

0

null

undefined