Domanda di colloquio di CodeMonkey

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

Risposta di colloquio

Anonimo

7 ott 2019

'==' = a loose equality operator. It equates 2 objects based on their value. '===' = a strict equality operator. It equates 2 objects based on their value as well as their type. 1=="1" is true, yet 1==="1" is false.