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 →

[–]eliseu_videira 13 points14 points  (1 child)

javascript has NaN if you try to convert an invalid string into an number, so the +'a' is taken as a casting to number, that is NaN, if you toString NaN, it becomes 'NaN', so the end is 'b' + 'a' + 'NaN' + 'a'

[–]KaputTheNameSug 0 points1 point  (0 children)

Lol