/

HTML / CSS / JavaScript Tutorial

JavaScript Math method: round()

[this page | pdf | back links]

The round() method (of the Math object) rounds a real number to the nearest integer.

 

It has the following syntax with the following parameters:

 

Math.round(x)

 

Parameter

Required / Optional

Description

x

Required

Input parameter

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript Numbers and Math


Desktop view | Switch to Mobile