say I have this simple situation:
const f = function(){
const fn = f.bind(null, arguments);
}
I am trying to implement a "retry" mechanism - this code checks out according to the static analysis and seems to the signature of Function.prototype.bind, but my question is:
is arguments going to be applied as simply the first argument to f or will it be spread out, as in, f.apply(null, arguments)? I am having trouble finding an example of this online.
const fn = f.bind(null, ...arguments);to spreadf.apply.bind(f, null, arguments)orf.bind.apply(f, [null, ...arguments])function f(...args) { const fn = () => f(...args); }...Array.from(arguments)...not sure why.