It cannot be chosen or reset by the user. JavaScript - Math floor Method - This method returns the largest integer less than or equal to a number. ECMAScript 2015 6th Edition ECMA-262 The definition of Mathfloor in that specification.
Because the floor function is a static function of the Math object it must be invoked through the placeholder object called Math.
Math is a built-in object that has properties and methods for mathematical constants and functions. Description Because floor is a static method of Math you always use it as Mathfloor rather than as a method of a Math object you created Math is not a constructor. The syntax of a JavaScript Floor Function is. If the given number is already an integer the floor method returns it directly.