Question d’entretien chez Dinero Software

difference between === and ==

Réponse à la question d'entretien

Utilisateur anonyme

25 janv. 2018

For strict equality(===) the objects being compared must have the same type 0 == false // true 0 === false // false, because they are of a different type 1 == "1" // true, automatic type conversion for value only 1 === "1" // false, because they are of a different type null == undefined // true null === undefined // false '0' == false // true '0' === false // false