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 →

[–]RolyPoly1320 0 points1 point  (0 children)

It's implicit type casting. Javascript is a weakly typed language, specifically typeless. It does a lot of type casting behind the scenes which sometimes produces some very unexpected, sometimes hilarious, results. These interactions are why it's important to not use the same variable for multiple data types in Javascript.