round / floor / ceil / abs
Rounding and absolute value.
Syntax
number.round(digits)
Description
round rounds to the nearest, floor rounds down, ceil rounds up; abs returns the unsigned value.
Example
Loading editor…
Expected output
3.14 4 7
When to use?
Displaying money, averages.