Open
Description
Explanation of this example is wrong:
https://github.com/denysdovhan/wtfjs#-is-equal-
The abstract equality operator converts both sides to numbers to compare them
This is just wrong. Strings are compared as strings, null compared to undefined is true, to-primitive might return a string instead on number and so on.
Here is how this expression simplifies:
+[] == +![];
First step would be to convert ![]
to false
because of precedence.
Metadata
Metadata
Assignees
Labels
No labels