I know that JavaScript can interpret {} as an empty block instead of an empty object. I don`t know why Node.js REPL (v12.3.1) behaves differently with semicolon and without semicolon.
>{}+{}
'[object Object][object Object]'
>{}+{};
NaN
I know that JavaScript can interpret {} as an empty block instead of an empty object. I don`t know why Node.js REPL (v12.3.1) behaves differently with semicolon and without semicolon.
>{}+{}
'[object Object][object Object]'
>{}+{};
NaN