You can call a JavaScript object while passing an array of arguments with the method apply
.
given:
function method(arg1, arg2){
console.log([arg1, arg2]);
}
you can use:
method.apply(this, ['one', 'two']);
Posted by Jonathan Knapp to Knowledge is Power! (2012-03-23 22:13)