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

parseInt() and parseFloat() are made for strings, not for numbers. I think you are looking for one of these:

Math.round() Math.ceil() Math.floor()



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

Search: