Question d’entretien chez IG Group

What is the difference between '==' and '===' in JavaScript?

Réponse à la question d'entretien

Utilisateur anonyme

29 juill. 2016

'==' tries to coerce one of the operands to match the other's type (for example: '5' == 5 will return TRUE...); '===' is more literal and compares the true types and values (...whereas, '5' === 5 returns FALSE).