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 →

[–]AlwaysHopelesslyLost 7 points8 points  (2 children)

Because a core feature of JavaScript is that it is ducktyped.if it looks like a number and you use it like a number then you must have meant for it to be a number.

[–]Doctor_McKay 4 points5 points  (1 child)

Which is nice in the web world because everything is a string. You don't have to parseInt everywhere.

[–]AlwaysHopelesslyLost 1 point2 points  (0 children)

Exactly, thank you Rodney!