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

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -