js.math
Réduire le nombre de chiffres après la virgule d’un nombre flottant
let int = 2.255841;
let intWithTwoDecimals = int.toFixed(2);
console.log(2.25) // type is string.
let int = 2.255841;
let intWithTwoDecimals = int.toFixed(2);
console.log(2.25) // type is string.