function set(){
let args = [];
for (let i = 0; i < arguments.length; i++) {
args[i] = arguments[i];
}
console.log(args);
let fn = args.shift();
fn.apply(this, args);
}
set(function(blabla, blabla2) {
console.log(blabla, blabla2);
}, 1000, 'привет');
let fn = function(blabla, blabla2) {
console.log(blabla, blabla2);
};
//внутри фн:
blabla = 1000;
blabla2 = "привет"