JavaScript truncate

JavaScript TRUNCATE Function

The JavaScript truncate function (trunc(x)) is a Math function. The trunc function is used to remove the decimal values from specified expression and return the integer value. The syntax of the JavaScript truncate Function is: Math.trunc(number); Number: It can be a decimal or a numerical expression If the number argument is a positive or negative number, JavaScript trunc function will … Read more