learn that the rounding rule of JavaScript"s toFixed method is banker rounding
.that is:
rounded into consideration, five is not zero, five is zero, five is parity, five years ago is even should give up, five before is odd to enter one.
11.556 = 11.56-six
11.554 = 11.55-four
11.5551 = 11.56-five after rounding
11.545 = 11.54-innumerable after five, If the leading position is even, you should leave out
11.555 = 11.56-innumerable after five. If the leading position is odd, you should carry
so in my understanding, the result of (0.45) .tofixed (1) should be 0.4, that is, after five innumerable, if the leading position is even, we should leave out
.ran goose
(0.075) .tofixed (2)
"0.07"
(0.085) .tofixed (2)
" 0.09"
(0.045) .tofixed (2)
"0.04"
does anyone know? Ask for advice
(er, there may be some holes in this question-_-| |)