I found it very nice that you gave a list of points where the spread operator is useful 👌
One thing I would add would be, in the Math functions section, that you can use the spread operator to pass array elements as arguments to a function in more use cases. One example would be calling a function with an array of arguments:
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
Really great article, @brandonbawe!👏
I found it very nice that you gave a list of points where the spread operator is useful 👌
One thing I would add would be, in the Math functions section, that you can use the spread operator to pass array elements as arguments to a function in more use cases. One example would be calling a function with an array of arguments:
This is the same as if you would be calling the
sumfunction with(1, 2, 3, 4)as “hardcoded” arguments.Keep it up!🙌
Thank you for your input Bruno. It is highly appreciated.
Thank you for you review Abhay. The Spread operator is really an awesome feature that makes JavaScript more fun to work with.
nice examples!
Thank you Maxi
spread is good but i find does not work recursively. try lodash merge function
Okay I'm going to try that out. Thank you for your input.
Good explanation of something that has been confusing for me!
yes, It's Good for me , Thank you so much
You are welcome Munir.
Thank you for sharing
That's Great Article, i learned something new about spread operator use case.
Math.min and Math.max i think its really useful.
Thank you for your review sir.