34,333
edits
Changes
→Rounding and Truncating Numbers with the the Math Object
'''Math.round()''' - Rounds a number to the nearest integer (i.e up or down depending on which is closest)
Each of the above methods takes a number as an argument and returns the modified value:
<pre>
rounded = Math.round(8.87);
</pre>