round up number javascript code example
Example 1: javascript round to nearest 10
var rounded = Math.round(number / 10) * 10
Example 2: round down the number javascript
+3.5 => +3.0
-3.5 => -4.0
+3.5 => +3.0 using Math.floor()
-3.5 => -3.0 using Math.ceil()