Rundzahl an 2 Dezimalstellen
Math.round(num * 100) / 100
Blushing Bird
Math.round(num * 100) / 100
function roundToTwo(num) {
return +(Math.round(num + "e+2") + "e-2");
}
console.log(roundToTwo(2.005));
var numb= 212421434.533423131231;
var rounded = Math.round((numb + Number.EPSILON) * 100) / 100;
console.log(rounded);