Based on your desired output it looks like you need to track the number of function calls. This doesn't seem to be an argument to your function.
Given the constraint that you have only a single argument, the implementation looks probably like
var lastNum = 0
var digitsToRound = 0
function roundUp(input) {
// Verify whether the function is called with the same argument as last call.
// Note that we cannot compare floating point numbers.
// See https://dev.to/alldanielscott/how-to-compare-numbers-correctly-in-javascript-1l4i
if (Math.abs(input - lastNum) < Number.EPSILON) {
// If the number of digitsToRound exceeds the number of digits in the input we want
// to reset the number of digitsToRound. Otherwise we increase the digitsToRound.
if (digitsToRound > (Math.log10(input) - 1)) {
digitsToRound = 0;
} else {
digitsToRound = digitsToRound + 1;
}
} else {
// The function was called with a new input, we reset the digitsToRound
digitsToRound = 0;
lastNum = input;
}
// Compute the factor by which we need to divide and multiply to round the input
// as desired.
var factor = Math.max(1, Math.pow(10, digitsToRound));
return Math.ceil(input / factor) * factor;
}
console.log(roundUp(2455.55)); // 2456
console.log(roundUp(2455.55)); // 2460
console.log(roundUp(2455.55)); // 2500
console.log(roundUp(2455.55)); // 3000