javascript round up to whole number





rounding - How to round up a number JavaScripts Math object provides a method for rounding to whole numbers. If we want to round to a set number of decimal places, then we have to handle that ourselves. Any body have any idea how I can round up to the next highest number?For example: If the number is a whole number like 1 or 2 return that number.You cant post JavaScript. The built-in Javascript function will round up the number based on standard logic (less and more than 5 to round up).And for those here wondering how to round up to the nearest WHOLE number, you just need Math.ceil(). But how can I round a number to the next highest whole number?What are the JavaScript version numbers and what version of ECMAScript do they match? I was looking up the history of JavaScript and found out that the ECMAScript specification is based on it. I need the final answer to round up to a whole number. The page is