Function Updated 30 May 2026
Math.floor(value)
Always rounds a number downwards.
Parameters
valuenumberrequiredValue to floor.
Returns
A number that is rounded against floor.
Example
Mixed HTML (or any text file) with inline JavaScript between hash signs.
This becomes 0:
#Math.floor(0.9)#The template above produces this output:
This becomes 0:
0