I have a function and I pass it an object and some arguments. EX:
someFunc: function(obj){
var cra = Array.prototype.call(arguments);
so, I call this function passing the following arguments:
someFunc({name: 'frank', age: '56', Location: 'New Heaven'}, 'name, 'age');
I want to have the new Array created "cra" contain all the arguments except the first argument argument[0] which is an object.
A for loop does not work and I don't want to use loops here. Is there something I am missing?
basically:
console.log(cra):
>>> ['name','age']
cra.shift()would modify the array to be what you want,cra.slice(1)would return what you want.