int(value)
Top  Previous  Next


Syntax
int(value)

Arguments
value: A number to be truncated to an integer.

Returns
Nothing.

Description
Function: Converts a decimal number an integer value by discarding the fractional part of the number.

Sample
int(3
.8);   // return value is 3
int(-9
.9);   // return value is -9

See Also

Math.floor