/

HTML / CSS / JavaScript Tutorial

JavaScript Math method: floor()

[this page | pdf | back links]

The floor() method (of the Math object) rounds a real number towards negative infinity.

 

It has the following syntax with the following parameters:

 

Math.floor(x)

 

Parameter

Required / Optional

Description

x

Required

Input parameter

 


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


Desktop view | Switch to Mobile