The Math trunc() static method returns the integer part of a number by removing any fractional digits.
console.log(Math.trunc(13.37));
// 13
console.log(Math.trunc(42.84));
// 42
console.log(Math.trunc(0.123));
// 0
console.log(Math.trunc(-0.123));
// -0