💡Javascript es6 tip: appending data to a collection using the spread operator ✅ Do you have a collection/list/array ✅ Want to add a new item ➡️ Use the spread operator "..." to add the new item to the collection How would you do it? Let me know below 👇
4
6
51
0
3
Download Image
@eddiejaoude Wait aren't you supposed to add the spread operator before item like data = [data , ...item ]
@code__mitch3L it depends, if joining 2 objects (or a field and an object), but here I am joining an item with a collection