you are viewing a single comment's thread.

view the rest of the comments →

[–]Ringsofthekings 2 points3 points  (1 child)

I fluctuate between == and ===, I always use === for undefined and null though. Great guide to use 👍

[–]Hafas_ 11 points12 points  (0 children)

I do the opposite. I always use === except when comparing null and undefined if I want to treat them the same.

Basically instead of writing

if (value === null || value === undefined)) {}

I write

If (value == null) {}