Pergunta de entrevista da empresa Glassbox

What is the difference between == to ===?

Resposta da entrevista

Sigiloso

29 de nov. de 2024

The == operator performs a loose equality comparison that performs type coercion if necessary to make the comparison possible. The === operator, on the other hand, performs a strict equality comparison that does not perform type coercion and requires the operands to have the same type (as well as the same value)