filmov
tv
javascript - Object spread vs. Object.assign

Показать описание
Let’s say I have an options variable and I want to set some default value.
What’s is the benefit / drawback of these two alternatives?
Using object spread
options = {...optionsDefault, ...options};
This is the commit that made me wonder.
What’s is the benefit / drawback of these two alternatives?
Using object spread
options = {...optionsDefault, ...options};
This is the commit that made me wonder.