Pergunta de entrevista da empresa RTB House

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

Resposta da entrevista

Sigiloso

25 de abr. de 2022

In JavaScript these are called equality operators and == converts the operands and tries to compare two operands of different types, while === means strict equality, e.g. it will return false if the values compared are of different types. Example: 2 == '2' => True 2 === '2' => False