Math.floor

Returns the greatest integer less than or equal to its numeric argument.

Syntax

floor(value)

Parameters

Return value

A number.

Examples

Math.floor(10.2)
10
Math.floor(10.9)
10

See also