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

Strings-->Numbers




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

Try the parseInt and parseFloat functions. They turn strings into
numbers. As close to typecasting as you can get in JavaScript!

Later,
Norm
--------------------------------------------------------------------
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'.