.map()
on arrays expects a function as parameter. This works:
[[1]].map(function(array) {
return Array.prototype.slice.call(array);
});
typeof Array.prototype.slice.call
returns "function"
.
So why doesn't the following call work?
[[1]].map(Array.prototype.slice.call);
It throws an error:
Uncaught TypeError: [[1]].map is not a function
at Array.map (native)
at <anonymous>:2:7
at Object.InjectedScript._evaluateOn (<anonymous>:895:140)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:828:34)
at Object.InjectedScript.evaluate (<anonymous>:694:21)