Content:
Definition
Spread Operator
Concatenating Arrays
Merging Objects
Copying Arrays and Objects
Turning Strings into Arrays
Rest Oper...
For further actions, you may consider blocking this person and/or reporting abuse
Spreading plain single-dimension arrays into array is the great and undervalued way to clone the Array!
Hi Barbara Robles,
Your tips are very useful
Thanks for sharing
...rest is left
right is ...spread
This would definitely help me!
Thanks a lot
This post is of great help, thanks a lot
There's some mistake in the third code block 😕
You mean the changes made in the const a variable, right? Changed it! Thank you for pointing that out!
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?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!
It post made me learn alot! Thanks! 👑
....Nice explanation thank you = Thank you
Does anyone else struggle with this syntax? A 'concise and clean language' seems a strange phrase for JavaScript - I find this extremely hard to read. I also think that functions with varadic arguments (the rest syntax) should mostly be avoided in application code (which is what the vast majority of us are writing)