Spread syntax (
...
) allows an array expression to be expanded in places where zero or more arguments are expected.(c) MDN
🐊Putout plugin adds ability to convert apply
to spread
.
npm i @putout/plugin-convert-apply-to-spread -D
{
"rules": {
"convert-apply-to-spread": "on"
}
}
console.apply(null, arguments);
console.log(...arguments);
MIT