[] [] = =

According to the ES5 specification, return true if the two objects being compared point to the same object, false otherwise, which is clearly two different array objects

2 = = [[[2]]]

According to the ES5 specification, if one of the two values being compared is of numeric type, the other value is first attempted to be converted to a number before the comparison. Casting an array to a number calls its toString method to a string, then a number, so [2] is converted to “2”, then recursively called, and finally [[[2]] is converted to the number 2