DEV Community

Discussion on: Alternative to the spread operator

Collapse
 
brianmcoates profile image
Brian

Love it thank you! Is there is there a way to do that with the spread operator as well?

Thread Thread
 
rhymes profile image
rhymes

Yes:

const newFood = { ...food, ...moreFood };