Transform the arguments object into an array

by Mohan 2012-09-20 22:51:30



Transform the arguments object into an array
JavaScript 1.6
function foo() {

var argArray = Array.slice(arguments); // is ['aa',11]
}

foo('aa',11);
use also
var argArray = Array.prototype.slice.call(arguments);



803
like
0
dislike
0
mail
flag

You must LOGIN to add comments