Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

== vs ===

var a = [1,2,3];
var b = [1,2,3];

var c = { x: 1, y: 2 };
var d = { x: 1, y: 2 };

var e = "text";
var f = "te" + "xt";

a == b            // false
a === b           // false

c == d            // false
c === d           // false

e == f            // true
e === f           // true

"abc" == new String("abc")    // true
"abc" === new String("abc")   // false
Source by 262.ecma-international.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
7+8 =