var O = {X:. 1 }, P = {X:. 1 }; // two objects having the same attribute the console.log (O == P); // to false two separate objects never equal var A = [], B = []; // two separate empty array the console.log (A == B); // to false two separate arrays never equal
Comparison object value is not: even though both contain the same objects and attributes of the same value, they are also not equal. Each element of the index is not exactly equal the two arrays are equal.
Reproduced in: https: //www.cnblogs.com/positive/p/3757163.html