Returns the integer part of the a number removing any fractional digits.
trunc(value)
value
A value of any number type.
An integer number.
Math.trunc(1.23)
1
Math.trunc(42)
42