Hacker News new | ask | show | jobs
by v0idzer0 1209 days ago
Doesn’t assigning properties behave differently? Spread creates a new object while assigning reuses the existing. Unless you mean creating a new object and then assigning the properties. I’d be surprised if that performed worse though. Also curious if the properties are primitives?