News for hackers. Stuff that matters.
Re:Null is an Object in JavaScript by conaclos on Wednesday February 08, 2023 @07:05AM (#34706979)

  In the end, it could as well be a linter rule that forces you to test v === null
  before calling typeof v and I think it would be the best option. If you care
  about this kind of stuff, you are probably already using a linter.
Yes. However, this does not allow performing more advanced optimizations. Bundlers, Transpilerss minifiers, and compilers must handle all this complexity making some optimizations unsafe or even impossible.

There are no comments on this comment yet.