JRS: In article <3F************@PointedEars.de>, seen in
news:comp.lang.javascript, Thomas 'PointedEars' Lahn
<Po*********@web.de> posted at Tue, 2 Dec 2003 16:51:26 :-
Dr John Stockton wrote:
Kenny <ke*********@email.com> wrote: It treats the values as a string and if the input numbers are 2 and
4 I get 24 and not 6 like I would expect.
But dose anyone know how to get it to recognizes the numbers in the
first place.
[...]
JP's response has been incompletely corrected by PE; see FAQ 4.12.
The FAQ entry does not imply in any way that my correction is
wrong (incl. not incomplete) as test results posted in other
threads have proven.
Yes, it does so imply. You did not correct JP's omission in not stating
that parseInt almost always needs a second parameter of 10. The FAQ
stresses that.
One should recommend reading the FAQ to those who ask rather well-known
questions at every reasonable possibility; doing so may render possible
subsequent questions unnecessary.
If you had looked at FAQ 4.12 yourself, you should have realised that it
deals with only parseInt; and your response ignored parseInt.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.