DEV Community

Discussion on: Spread vs Rest Operators in JavaScript

Collapse
 
stevem profile image
steve

It was a good detailed article. One query, the rest is on the left side of = by left side do you mean when we declare functions or destructure variables?

Collapse
 
baroblesvi profile image
Barbara Robles (english prof.)

Thank you for your comment! Actually, I meant for destructuring! When it comes to functions, the rest is used on function definitions, while the spread operator is used when calling the function! Hope this helps!