Reposted by David
Trying to be strict with truthy/falsy checks in JavaScript because it might introduce bugs.
JS has two bottom types: null and undefined which makes it a hassle.
Learned today that
x == null
checks for both null and undefined i.e
undefined == null // true
developer.mozilla.org/en-US/docs/W...
developer.mozilla.org
null - JavaScript | MDN
The null value represents the intentional absence of any object value. It
is one of JavaScript's primitive values and
is treated as falsy for boolean operations.