Math.round

Returns a number rounded to the nearest integer.

Syntax

round(value)

Parameters

Return value

A number.

Discussion

Examples

Math.round(10.4)
10
Math.round(-10.4)
10
Math.round(10.5)
11
Math.round(-10.5)
-10
Math.round(10.9)
11
Math.round(-10.9)
-11

See also