Skip to content

EasyConceptJavaScript

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

What a good answer covers

== converts types before comparing, while === compares value and type with no coercion. Prefer === to avoid surprises such as 0 == "".

More on JavaScript

Flashcards for this topic