Why is it when I write {}.key = 0 in the chrome console I get an error:
> {}.key = 0
> Uncaught SyntaxError: Unexpected token .
But when I encapsulate the above expression in parentheses (( )) I get no error:
> ({}.key = 0)
> 0
What exactly is going on here? I would have thought the same error I got in the first scenario still applied to the second?
Image of console output:
