how to retrieve first decimal from float in java script code example Example: get decimals from float javascript js> 2.3 % 1 0.2999999999999998