Hacker News new | ask | show | jobs
by petre 862 days ago
Still the same footguns for the sake of backwards compatibility. Things like:

  typeof '' == 'string'
  false
And many others that I'm are too depressing to mention. This is the latest one that I got surprised with.

Yes, it's fast but so is Lua, Dart or even Racket.

2 comments

wha?

    Welcome to Node.js v19.9.0.
    Type ".help" for more information.
    > typeof '' == 'string'
    true
???
Can I qoute my comment verbatim back at you?

Seriously. Just don't use ==. Use ===. Et voila you're using a modern pleasant scripting language.

Modern guides on js won't ever mention ==. As a noob today you won't ever learn it. In a big project there will be a linter to stop you