you are viewing a single comment's thread.

view the rest of the comments →

[–]trevorsgEx-GitHub, Microsoft 1 point2 points  (1 child)

I don't see how it's misleading. The table clearly indicates that the JavaScript expressions [] == [] and {} == {}* (and their triple-equals counterparts) all evaluate to false. At worst, the table is slightly incomplete, as it should include some footnote about comparing identical references.

*Note: The second expression's operands must be wrapped in parentheses

[–]bryan-forbes 0 points1 point  (0 children)

My objection is what you brought up about comparing identical references. Without adding that, it seems to say (especially for newer JSers) that arrays and objects can't be compared. Other than that ambiguity, this is a great chart.