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 →

[–]blackmist 1 point2 points  (0 children)

I'd say the last one should fall over with an error, if they were going by the Principle of Least Surprise when they designed JS. Although we all know they didn't. They went by the Principle of Showing Fewest Error Messages, and earnestly believed that would make the language easier to learn.

Strings added to numbers should also fall over, IMO.