JavaScript truncate

The JavaScript truncate function (trunc(x)) is a Math function. The trunc function removes the decimal values from specified expressions and returns the integer value. The syntax of the JavaScript truncate Function is: Math.trunc(number); Number: It can be a decimal or a numerical expression JavaScript truncate Function Example The truncate Function removes the decimal values and returns the … Read more