how to take a number with a decimal point to a whole number javascript code example Example: javascript convert int to float with 2 decimal places float_num.toFixed(2);