JavaScript WTFs are kind of tired, but this one is new to me and it feels deeper than usual: In JavaScript, `==` is an equality operator, but it is not transitive! false == [0] //=> true [0] == false //=> true [0] == [0] //=>false!!!!! (via https://www.reddit.com/r/javascript/comments/bgv0su/if_either_value_aka_side_in_a_comparison_could_be/elo3mo7/ …)
-
-
Well, even within that definition, this is a WTF. For example, if it always coerced to strings, it would be transitive.
-
...depending on order of precedence!
- 4 more replies
New conversation -
-
-
This is my new favorite “well, actually”
-
Keep reading the thread, it's Well, actually" all the way down...
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.