What’s the criteria for output determinism in Javascript

const x = [1,2,3]
x.splice(0,1)//[1]
x.splice(0,1)//[2]
x.splice(0,1)//[3]

I know that pure functions should not mutate things and should be deterministic.

And I know that .splice is impure because of (at least) the mutation that it does. But how about determinism, is splice considered indeterministic (same for push, unshift…)? If we thought about the params as only 0 and 1 then it’s indeterministic, but if we thought of x as input too, then it’s deterministic, no?

Because I’m thinking of this Array.prototype.splice.call(x, 0, 1) which will make it deterministic.

In other words, what is the criteria for output determinism are in a function which sits on the prototype and does something with this, like splice.

More specifically what constitutes the input (is this included as an input?)?