Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

careful

   parseFloat("08") === parseFloat("09") === 0

http://stackoverflow.com/questions/850341


That only applies to parseInt because it tries to guess the radix if one isn't supplied. parseFloat assumes base 10 and doesn't accept a radix argument.


Oh that's neat. Thankyou.


whoops, got out of bed too early




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: