Console.log (' [] == [] is: ' + ([] == []); //falseconsole.log (' [] === [] is: ' + ([] === []); //falseconsole.log (' {} == {} is: ' + ({} == {}); //falseconsole.log (' {} === {} is: ' + ({} === {}) '); //false //trueconsole.log ( ' [] == !{} Yes: ' + ([] == !{} ); /*! {} is a Boolean value, false, so we compare [] == 0*/var n0 = 123;var n1 = new Number (123); Var n2 = new number (123); Var n3 = number (123);var n4 = number (123); Console.log (' n0 == n1 is: ' + (N0 == N1)); //trueconsole.log (' n0 == n3 is: ' + (N0 == N3)); //trueconsole.log (' n0 === n1 is: ' + (N0 === N1)); // Falseconsole.log (' N0 === n3 is: ' + (N0 === N3)); //trueconsole.log (' n1 == N2 is: ' + (N1 == N2)); //falseconsole.log (' n1 === n2 is: ' + (n1  === N2)); //falseconsole.log (' N1 == n3 is: ' + (n1 ==  N3)); //trueconsole.log (' N1 === n3 is: ' + (N1 === N3)); //falseconsole.log (' N3 == n4 is: ' + (N3 == N4)); //trueconsole.log (' N3 === n4 is: ' + (N3 === N4)); //true
Output:
Original: http://www.ido321.com/1427.html
= = and = = in JavaScript