To read more about
object destructuring, you can follow below link:
Let’s explore some of the examples of Spread operators.
Spread Operator Examples
Learn how to initialize array from another array
Create new array from existing array.
Expanded version of an array into another array
A Better way to concatenate arrays
Learn how to initialize object from another object
Similarly, you can create new object from existing object.
Spread operator in Object Destructuring
You can simply add a property to an object without mutating the original.
Note: For objects, the order of where you put the spread matters. What comes first is ‘overridden’ by what comes later.
So, in summary, we learn how we can use spread operator to spread an array or object elements. I tried to give a