How to parseInt a string with leading 0

Viewed 8345

How to parseInt "09" into 9 ?

6 Answers

You can also do:

Number('09') => 9

This returns the integer 9 on IE7, IE8, FF3, FF4, and Chrome 10.

Related