Last Updated: February 25, 2016
·
490
· weinto

parseInt('08') and parseInt('09') to 8 and 9

In Javascript numbers starting with zero are considered octal and there's no 08 or 09 in octal.

parseInt('08', 10) and parseInt('09', 10) will give you 8 and 9 instead of 0.