0 votes
in JavaScript by
What are the differences between spread operator and rest parameter in Javascript?

1 Answer

0 votes
by

Rest parameter collects all remaining elements into an array. Whereas Spread operator allows iterables( arrays / objects / strings ) to be expanded into single arguments/elements. i.e, Rest parameter is opposite to the spread operator.

...