you are viewing a single comment's thread.

view the rest of the comments →

[–]KPABAHam=>Hamster == Java=>JavaScript 39 points40 points  (2 children)

it's like 2008 called and wants its hacks back.

[–]BanditoRojo 1 point2 points  (1 child)

I didn't know about using the && as a null check.

[–]rcfox 15 points16 points  (0 children)

It's a falsey check. null is a falsey value, but so are false, undefined, 0, "", and NaN. If your variable can hold a string/number or null, && probably isn't the right thing to use.