Javascript: how to pass parameters to function dynamically -
I am trying to extract a way to pass the parameters of separate function from commas, not the object. I know how to complete this:
var executeClout = function execute callback (callback) {var args = []; If (type opts [callback] === 'function') {Array.prototype.push.apply (args, arguments); If (arguments.length & gt; 1) {args.shift (); } // opts: A variable opts [callback] (args) outside this function; }}; Executable callback ('Foo Callback', [1, 2, 3], 'Bar');
But I would really like to pass the algues for my ops object because I am normally, for example:
opts [callback ] (Arg1, arg2);
Why?
What is the way to do this in a bi-monthly way?
Very bound.
/ Div>
Comments
Post a Comment