0
Will any one tell me what's different between == and === ?
I can't differentiate between this two operators😥.
1 Réponse
+ 5
var x=5;
var y="5";
alert(x==y);
alert(x===y);
consider the code above
x is an integer type
y is a string type
== will result in true by checking if the values are equal
=== will check for values equality AND type equality and will return false