Function Method Reference
Calls the function with the provided args as an array. Useful when arguments need to be dynamically generated.
fn function(arg1, arg2) { return [arg1, arg2]; }
var arr = function.apply([1, 2]); // [1, 2]Parameters
Section titled “Parameters”args: [dyn!] - The arguments of the original function in an array.
Returns
Section titled “Returns”dyn! - The value of the original function.
Calls the function with the provided args. Useful when calling a nullish value.
fn function(arg1, arg2) { return [arg1, arg2]; }
var arr = function.call(1, 2); // [1, 2]Parameters
Section titled “Parameters”call is called with the same arguments as the original function.
Returns
Section titled “Returns”dyn! - The value of the original function.