Round to nearest 100

Rounds integer/float to nearest 100 (floor + ceil)

Round to nearest 100

Note: It uses both ceiling and floor.

const roundToNear100 = (value) => {
    if (value <= 100) return value;
    let decider = value % 100;
    let roundFunc = (decider < 50) ? Math.floor : Math.ceil;
    return roundFunc(value / 100) * 100;
}