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.
Written by Nicolas Bages
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#