Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javaScipt diference != and !==

/*
   != accept 1 as equals of true, 0 as equals of false and some others
   (because the values are automatically casted when being compared).
   !== accept only "real" equalities (i.e. compares both the value and the type)
*/
alert(1 != true); //this is false
alert(1 !== true); //this is true
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javaScipt #diference
ADD COMMENT
Topic
Name
3+8 =