Why is it that when i type {} === null
into the console it throws
SyntaxError: Unexpected token ===
null === {}
gives me false as expected.
Because {}
is treated as an empty block. You can wrap it in parentheses to force an expression:
({} === null)
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