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
because if it's not a primitive type (String, Number, Boolean), if it's an array or an object then the comparison operators will check if it's exactly the same instance. So
var a = ['as','ds'];
var b = a;
var c = ['as','ds'];
b == a; //will return true; (doesn't matter if it's == or === for non primitive types)
b == c; //will return false;
so basically you need to define your own method to compare arrays and see if all elements are the same. This sort of function usually doesn't exist because it can be very expensive and there's usually another way to write that sort of thing.