Why does commuting the arguments of == in a console change the output?
问题 If I open my browser console (tested in Chrome/Firefox) and type: null == {} I get: false However, if I commute both arguments to the == operator and instead type: {} == null I get: Uncaught SyntaxError: Unexpected token == Image: Why does this happen? Why does this only happen in a console and not when the browser executes a script within an HTML page? EDIT: While question 35812626 addresses this and explains the cause as JS parsing the {} as a code block, it uses the triple equals (strict