0

Will any one tell me what's different between == and === ?

I can't differentiate between this two operatorsđŸ˜„.

10th Nov 2016, 3:12 PM
Namas Thapa
Namas Thapa - avatar
1 Answer
+ 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
10th Nov 2016, 3:22 PM
Burey
Burey - avatar