Possible Duplicate:
How can I round of to whole numbers in JavaScript?
In javascript is there a function which allows me to round to the nearest integer? Either up or down.
So:
2.1 = 2
2.9 = 3
4.5 = 5
1.1 = 1
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
Math.round(number):