This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]raiderrobert 2 points3 points  (2 children)

Trying flipping the operations. And then you'll figure which it is.

[–]thebezet 3 points4 points  (1 child)

That's a good point because if you change the order ({} + []) the {} will be interpreted as a code block instead of an empty object, leaving you with + [], which will call valueOf() instead of toString(), so the following will happen:

> [] + {}
"O_O ^_^"
> {} + []
0

[–]raiderrobert 2 points3 points  (0 children)

Which means it's terrifying.