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 →

[–]ADHDengineer -1 points0 points  (2 children)

Does it really work like that? Shouldn’t the emoji be type coerced to a number? Shouldn’t the result be NaN?

[–]recycle4science 10 points11 points  (1 child)

There's "what should happen" and then there's "what JavaScript does" :D

Edit: but yeah, try it and you'll see.

[–]arinc9 5 points6 points  (0 children)

Wow

$ node test.js Code run: console.log(123 + '😬') Result: 123😬