I want to create a copy of my arguments inside a logging function using angular.copy().
Since the arguments is already an Array, I expected to get an Array but it returned Object instead of Array.
$scope.log = function(argN) {
console.log("arguments", arguments, angular.copy(arguments));
if (typeof(console) !== 'undefined') {
console.log.apply(console, angular.copy(arguments));
}
}
- Is this some sort of standard practice of copying?
- How can I get Array instead of Object?
argumentsis not an array.