Skip to content
Advertisement

Merging an array property with the same key within an object

If I want to append to an existing property that’s an array, what’s the cleanest solution?

JavaScript

It instead overwrites the index of access with the last assignment.

Advertisement

Answer

You can simplify logic

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement