js cut off at two decimal places code example Example: how to cut off decimals in javascript string.split(".")[0];