Feb 23, 2017 · 1 min read
Number.toFixed doesn’t round a number, it returns a string representation of a number with the specified number of digits after the decimal point, it just chops the rest of the numbers off, no rounding arithmetic goes on at all.
Rounding a Float in JS is actually quite complicated but there is an example of how to do it on the Math.round page of the MDN docs
