Math.floor( x ) in ECMAScript 262

Return largest integer which is less than x (aka "round down").

Arguments

nametypedescription
x Number The value to operate upon.
Return Type
Number

Description

var x = Math.floor(12.832);
// ** x is 12

var y = Math.floor(-12.832);
// ** y is -13

var z = Math.floor(1);
// ** z is 1