Question d’entretien chez CACI International

In JavaScript, what is the difference between == and ===?

Réponse à la question d'entretien

Utilisateur anonyme

23 mai 2017

== checks for equality as in any language, but doesn't care for types, so 5 == "5" is true, even though one is a number and one is a string. === will also check the types are the same. (So in a sense == will cast accordingly).

2