You'll need to be careful with the order you use the spread operator. If the first object contained c it would not have been replaced. Change the order and you'll get your expected result. Also the spread operator is a shallow copy.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You'll need to be careful with the order you use the spread operator. If the first object contained c it would not have been replaced. Change the order and you'll get your expected result. Also the spread operator is a shallow copy.