Код: Выделить всё
let a = 0.198450;let b = 0.303450;
a = Math.round(a * 10000) / 10000;
b = Math.round(b * 10000) / 10000;
console.log("a Value is : "+a);
console.log("b Value is : "+b);
Подробнее здесь: https://stackoverflow.com/questions/794 ... difference