There is a variable that accepts numbers of the form 1233.0125499813075 - is it possible to do something like that, so that the numbers are rounded up to the form 1233.01 (2 digits after the dot)?

Update

I apologize, opened my eyes, saw .toFixed(2);

Reported as a duplicate by participants Andrey NOP , 0xdb , Grundy javascript Apr 22 '18 at 4:01 pm

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

    1 answer 1

    So it is possible:

     var perem = MATH.round(perem * 100) / 100; 
    • @exeption, this is how I needed: polnsumm = (summa - allsum) .toFixed (2); - Goshka Tarasov