The toFixed() method returns a string, with the number written with a specified number of decimals.
let a = 5.456;
console.log(a.toFixed()); // 5
console.log(a.toFixed(0)); // 5
console.log(a.toFixed(2)); // 5.46
console.log(a.toFixed(4)); // 5.4560
console.log(a.toFixed(6)); // 5.456000