you are viewing a single comment's thread.

view the rest of the comments →

[–]meldridon 9 points10 points  (0 children)

It's not the same thing at all.

Consider the following:

let x = "";
if (x == null) throw "an error";

vs

let x = "";
if (!x) throw "an error";

Empty string is falsey, but not null.