|
|
|
|
|
by mantap
2523 days ago
|
|
No this is not an alternative, it will fail if the array is too large, as you will exceed the maximum number of arguments a function will accept (which is implementation defined). In general the spread operator should only be used for forwarding arguments not for array operations. |
|
Not quite. You should also use the spread operator when you are spreading an iterable into an array: