WeCodeAcademy
❮ isNaN()Math.floor() ❯

Math.round()

Rounds to the nearest integer.

Group: Math

Syntax

Math.round(x)

Example

Examplejavascript
Open in editor »

← All of JavaScript Reference