News for hackers. Stuff that matters.
Re:JavaScript Is Weird by bee_rider on Sunday August 13, 2023 @12:27PM (#37111409)
I mean, it is a weird statement in that the language apparently needs a === operator.

Of course, after looking up what === is, the behavior is obvious.

Re:JavaScript Is Weird by threatofrain on Sunday August 13, 2023 @12:44PM (#37111577)
That wouldn't change anything here. This behavior is due to the IEEE 754 number spec, which is implemented in many languages.
Re:JavaScript Is Weird by bee_rider on Sunday August 13, 2023 @02:37PM (#37112761)
The floating point behavior is the obvious part, the === operator is the head-scratcher.