trim decimal number javascript code example
Example 1: javascript how to take off a decimal
function png(){
return Math.trunc(Math.random() * 10);
}
//Removes the decimal without rounding
Example 2: how to cut off decimals in javascript
string.split(".")[0];