Created
January 17, 2019 14:31
-
-
Save StevenMDixon/953928079109a3d1fa013040e0de4560 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
we start with two alike arrays that need to be combined, the output should combine items that are exactly the same. | |
let array_one = [{name: "cats", count: 1},{name: "dogs", count: 2}]; | |
let array_two = [{name: "cats", count: 5}, ,{name: "chickesn", count: 4}]; | |
// expected output [{name: "cats", count: 6},{name: "dogs", count: 2} ,{name: "chickesn", count: 4}}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment