+ 2
Why if 0=="0" in javascript return true
if(0=="0") alert("true"); else alert("false");
2 Answers
+ 6
== checks if they both are same values not data type. Use === in this case which will check values and data type also all you need to do is
alert(0 === "0");
because the browser will return true or false for you
+ 4
it just compares if both are equal to or not and does not care about the data type of both. you can use === for checking data type.