F
FAQ server
-----------------------------------------------------------------------
FAQ Topic - Why does parseInt('09') give an error?
-----------------------------------------------------------------------
The parseInt function decides what base the number is by looking
at the number. By convention it assumes that any number beginning
with 0x is Hexadecimal, and otherwise any number beginning with
0 is Octal. To force use of base 10 add a second parameter
« parseInt("09",10) »
http://msdn.microsoft.com/library/en-us/script56/html/js56jsmthparseint.asp
http://docs.sun.com/source/816-6408-10/toplev.htm#1064173
http://www.jibbering.com/faq/faq_notes/faq_notes.html#FAQN4_12
===
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javascript FAQ is at http://www.jibbering.com/faq/.
The FAQ workers are a group of volunteers.
FAQ Topic - Why does parseInt('09') give an error?
-----------------------------------------------------------------------
The parseInt function decides what base the number is by looking
at the number. By convention it assumes that any number beginning
with 0x is Hexadecimal, and otherwise any number beginning with
0 is Octal. To force use of base 10 add a second parameter
« parseInt("09",10) »
http://msdn.microsoft.com/library/en-us/script56/html/js56jsmthparseint.asp
http://docs.sun.com/source/816-6408-10/toplev.htm#1064173
http://www.jibbering.com/faq/faq_notes/faq_notes.html#FAQN4_12
===
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javascript FAQ is at http://www.jibbering.com/faq/.
The FAQ workers are a group of volunteers.