Pergunta de entrevista da empresa FamilySearch.org

Difference between == and === in js.

Respostas da entrevista

Sigiloso

30 de mar. de 2023

The 3 equal signs mean "equality without type coercion". Using the triple equals, the values must be equal in type as well. 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

Sigiloso

11 de jun. de 2017

Explaining the difference between the 2. Its a fairly common js interview question...