[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nebie Question - Addition vs. Concatenation



On Wed, 21 Feb 1996 19:34:11 -0500, you wrote:

>Hi everyone.
>
>I;ve just started learning JavaScript, so I decided that my first project
>would be a simple four-function calculator.  It works great except for addition.
>
>When I add 5 + 10, I get 510.  For some reason, the procedure treats my
>numbers as strings, while in the other three operations, it works fine.


Use 1 * 5 +10, you'll get 15...<G>

--------------------------------------------------------------------
This message came from the mailing list javascript. For help using the
mailing list software, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.