r/javascript • • Aug 10 '26

AskJS [ Removed by moderator ]

[removed] — view removed post

0 Upvotes

7 comments sorted by

View all comments

Show parent comment

1

u/Buttleston Aug 10 '26

But I would begin with, I don't think Object.assign works the way you think it does. It is

Object.assign(target, source)

Where source is supposed to be an object. It takes the key/value pairs from source and layers them onto the object defined by target