menu

JavaScript Operators


1. What is the result of true || false in JavaScript?

1

0

1

0


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

1

0

null

undefined


3. Which operator is used for subtraction in JavaScript?

+

-

*

/


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

6

6

23

5


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

1

0

null

undefined


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

2

3

4

undefined


7. What is the result of "3" / 2 in JavaScript?

1.5

2

3

NaN


8. What is the result of 10 % 3 in JavaScript?

1

2

3

4


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

number

string

boolean

undefined


10.

Which operator is used for addition in JavaScript?

+

-

*

/