Anatoli Papirovski aefbb1380e No unneeded empty arrays in transform spread (#6763)
* No unneeded empty arrays in transform spread

Since Array.prototype.concat creates a new array from inputs, there's
no need to call it from a new empty array ([].concat()).

* [fixup] simplify detection of new array
2017-11-09 14:51:56 -05:00

10 lines
155 B
JavaScript

function foo() {
return bar(Array.prototype.slice.call(arguments));
}
function bar(one, two, three) {
return [one, two, three];
}
foo("foo", "bar");