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

Nebie Question - Addition vs. Concatenation

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.

The url is http://zion.gt.ed.net/calc.html

Any help you can give would be great.  THanks again.

David Gotz

| David H. Gotz
| Georgia Tech
| 331252 Georgia Tech Station
| Atlanta, GA 30332-1370
| (404) 206-8032
| gotz@cc.gatech.edu
| http://zion.gt.ed.net/
| http://www.cc.gatech.edu/people/home/gotz/

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'.