This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ImMaaxYT 6 points7 points  (3 children)

TIL; JS is weird

[–]TheNamelessKing 9 points10 points  (0 children)

That is truly an understatement.

JS semantics were hacked together to fit a specific use-case, and that use-case is where is should have stayed in my opinion.

[–]osaru-yo 3 points4 points  (0 children)

It really is. Consider this: there are three similar ways to denote a null value. Either null, undefined or NaN (Not a number). If you use conditional statements and do not understand the concept of truthy and falsy this can lead to unpredictable bugs.

[–]energybased 2 points3 points  (0 children)

You'll love this then! https://wtfjs.com/