I know that ===
is typically referred to as the identity operator. Values being compared must be of the same type and value to be considered equal. Then why bel
First of all === is strict equality, not an identity operator, and Arrays, like objects are reference objects, not value objects as in the case of numbers and strings...
So when you are comparing those 2 arrays, you are creating two different arrays in memory. It'd be the same as saying...
var x = { a: 1 };
var y = { a: 1 };
x === y; //false
You can't directly compare arrays or objects like that.