0

Can someone explain Rest and Spread in simple terms?

17th May 2021, 6:07 AM
Prashandip Limbu
Prashandip Limbu - avatar
2 Antworten
+ 5
->The spread operator allows us to spread the value of an array (or any iterable) across zero or more arguments in a function or elements in an array (or any iterable). ->The rest parameter allows us to pass an indefinite number of parameters to a function and access them in an array.
17th May 2021, 6:50 AM
Apongpoh Gilbert
Apongpoh Gilbert - avatar
+ 1
You can find the example in my recent code. https://code.sololearn.com/cA15A88A19A4/?ref=app
17th May 2021, 8:56 AM
Avinesh
Avinesh - avatar