4 ms·
Where are you finding that? This is what I get from Chrome: foo(1, 2, 3) // ["a", "b", "c"] // [1, 2, 3] And this is what I get from https://babe
by bsimpson 11y ago
Where are you finding that? This is what I get from Chrome:
foo(1, 2, 3)
// ["a", "b", "c"]
// [1, 2, 3]
And this is what I get from https://babel.io/repl https://babel.io/repl :
'use strict';
function foo() {
var _arguments = arguments;
var bar = function bar() {
for (var _len = arguments.length, abc = Array(_len), _key = 0; _key < _len; _key++) {
abc[_key] = arguments[_key];
}
console.log(abc);
console.log(_arguments);
};
bar('a', 'b', 'c');
}
- exogen 11y agoFirefox. Chrome has not released support for rest params yet (it's in beta).