I put the following into the browser console:
0 === {} // false
{} === 0 // SyntaxError: expected expression, got '==='
Why is this?
I put the following into the browser console:
0 === {} // false
{} === 0 // SyntaxError: expected expression, got '==='
Why is this?
{} === 0
here {}
is block statement not object literal.
But if you do say var a = {} === 0
it would work
var a = {} === 0
console.log(a);