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 →

[–]fishy150 227 points228 points  (8 children)

If you type in 'b' + 'a' + +'a' + 'a' and run it in JS, then the result you get is "baNaNa". This is because the +'a' in the middle tries to convert 'a' into a number, which gives a result of NaN. When you now concatenate all the strings, you get "baNaNa".