JRS: In article <sl******************@clunker.homenet>, dated Wed, 23
Nov 2005 05:51:19, seen in news:comp.lang.javascript, Jasen Betts
<ja***@clunker.homenet> posted :
On 2005-11-21, we*******@micfiles.com <we*******@micfiles.com> wrote: Thank you... This is almost working now... I seem to have a syntax
issue in the addition part of the script... If my first variable gets
a value of 2 and my second variable gets a value of 4, my total should
be 6. However, I am currently getting a total of 24.
NOW what did I screw up?
You screwed up your reading of FAQ 4.21.
:) they come from the form as strings, one way to convet them to numbers is
to multiply them by 1.
True. But many now prefer to convert a string to a number with the
unary + operator. FAQ 4.21.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.