Beginner JavaScript
Q27 / 100

What is the difference between == and ===?

Correct! Well done.

Incorrect.

The correct answer is B) == performs type coercion before comparing; === compares type and value without coercion

B

Correct Answer

== performs type coercion before comparing; === compares type and value without coercion

Explanation

1 == "1" is true (coercion); 1 === "1" is false. Always prefer === to avoid surprising coercion results.

Progress
27/100