IT Questions and Answers :)

Tuesday, December 24, 2019

In JavaScript, which of the following expressions evaluates to false?

In JavaScript, which of the following expressions evaluates to false?

  • 0 == false
  • "1" === 1
  • 1 == true
  • 1 === true 
In JavaScript, which of the following expressions evaluates to false?

EXPLANATION

Strict equality (===) means values which we are comparing must have the same type. This means "1" will not be equal to 1("1"===1 it will return false) Type converting equality (==) means automatically it will covert the variable to value irrespective of data type; either it is a string or a number.

Share:

2 comments:

Popular Posts