Q
What is the result of '' == false in JavaScript?

Answer & Solution

Answer: Option A
Solution:
JavaScript converts false to 0 and an empty string '' to 0 before comparison. Hence, both are equal.
Related Questions on Average

What is the result of 5 > 3 in JavaScript?

A). 1

B). 0

C). NaN

D). undefined

How does JavaScript evaluate null === undefined?

A). 1

B). 0

C). NaN

D). undefined

What will be the output of 5 === 5 in JavaScript?

A). 1

B). 0

C). NaN

D). undefined

What does '5' < 10 evaluate to in JavaScript?

A). 1

B). 0

C). NaN

D). undefined

How does JavaScript evaluate 'true' == true?

A). 1

B). 0

C). NaN

D). undefined

What does '5' !== 5 evaluate to in JavaScript?

A). 1

B). 0

C). NaN

D). undefined

What does 5 === '5' evaluate to in JavaScript?

A). 1

B). 0

C). NaN

D). undefined

What will be the output of null == undefined in JavaScript?

A). 1

B). 0

C). NaN

D). undefined

What does NaN !== NaN evaluate to in JavaScript?

A). 1

B). 0

C). NaN

D). undefined

How does JavaScript evaluate 10 !== '10'?

A). 1

B). 0

C). NaN

D). undefined