JavaScript Math trunc() Method
The Math.trunc() method in JavaScript returns the integer part of a number by removing its fractional part. It essentially truncates the decimal portion of a number towards zero, resulting in an integer. For positive numbers, it's equivalent to flooring the number, while for negative numbers, it's a