Skip to content Skip to sidebar Skip to footer

Javascript Array Parameter List

Possible Duplicate: Calling dynamic function with dynamic parameters in Javascript I have an array representing the parameters I need to pass to a function call. How can I cons

Solution 1:

Use arguments:

function A()
{
    alert( arguments[0] ); // 1alert( arguments[1] ); // 2alert( arguments[2] ); // 3
}

A(1, 2, 3);

More info on MDC (Mozilla Develop Center).

Post a Comment for "Javascript Array Parameter List"