Back to functions

round


round

Rounds a number to the nearest integer.


Usage: nerdamer("round(number)")


Parameters

expression number Returns the appropriate value if possible otherwise it returns the function with the simplified expression

EXAMPLES:
var x = nerdamer('round(5.7)').evaluate();
console.log(x.text());
x = nerdamer('round(1.4)').evaluate();
console.log(x.text());
OUTPUT:
Back to functions