how to trim a decimal value in javascript code example Example: how to cut off decimals in javascript string.split(".")[0];