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

The funny thing is that in Javascript:

12 == parseInt('012')

returns false. :)



A leading zero usually means 'this number is octal', so parseInt returns 10. Not very intuitive notation, however.




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

Search: