The problem of taking 100x of js

you need to get the maximum multiple of 28730.01 from a random number greater than 100, say 28730.01, and you can get 28700
876. How do you achieve this?

Mar.09,2021

is very simple, for example, if this number is n, first divide by 100, then round off all the decimals, and finally multiply by 100, you can

function getMultiple(num) {
    return parseInt(num / 100) * 100
};
Menu