Sometimes you need to get the decimal point of a number with JS when you are calculating something. How you’ll get it is given below:

let num = 15.33;
let numFloor = Math.floor(num)
document.write((num - numFloor).toFixed(2)) // Result is 0.33
Tags: ,