Quiz on JS Operators

Question 1

What is the value of y?

let x = 10;
let y = (x > 5) && (x < 15); 

a - 10

b - 5

c - 15

d - true

Ans d - true

Question 2

What is the value of x?

let x = 5; 
x += 3; 

a- 3

b- 8

c- 15

d- 5

Ans b - 8

Question 3

What is the value of y?

let x = 10; 
let y = x++; 

a- 10

b- 11

c- 12

d- 13

Ans a - 10

Question 4

What is the value of y?

let x = 1; 
let y = x !== 2;

a- 1

b- 2 

c- false

d- true

Ans d - true