Math.trunc
trunc — Returns the number without it's fractional digits.
Description
Math.trunc(number number)
Parameters
Name | Description | Type | Default | Optional |
---|---|---|---|---|
number | number | No |
Changelog
Version | Description |
---|---|
ES 6 | Introduced. |
Examples
Example #1 – trunc example