Does the following:
x || x === {}
not mean !!x, that is, x is defined?
That comparison makes no sense, because either x is truthy, then you get the result of x, or falsy, you get false (a falsy value is never strict equal to an empty object instance).
A concise version would be
x || false
for give me x or false.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With