re: Double Equals vs Triple Equals in JavaScript VIEW POST


Good explanation.
But triple equals mainly checks the equality between objects like left side and right side both are referring to the same object or not.
For example,

var a = {}
var b = {}
console.log(a === b) //False

Above code will return FALSE because both variable not referring to same object. Let's consider another example.

var a = {}
var b = a
console.log(a === b) // True

The above code will return TRUE because both left and right side referring to same object.

code of conduct - report abuse