function test() { for(var i = 0; i < arguments.length; i++) { console.log(arguments[i]); } }
function test() { var args = [0,1,2]; test2(...args); } function test2(x,y,z) { console.log(y); }