I know that you have to be very careful with the function Argument object
But are there any known flaws (optimization / performance issues) using the spread operator with the Arguments object? Or is it completely normal?
I want to create an array from an unknown number of arguments passed to the function:
function Numbers(){
this.numbers = [...arguments];
}
The violin can be found here.
This looks pretty neat, and the MDN page about the Arguments object even suggests that I can use the spread operator to do this:
You can also use a method Array.from()or distribution operator to convert the arguments to a real array.
But I still would like to see if others have an opinion on this.