Created
May 2, 2019 21:24
-
-
Save ivanlawrence/45bc9d10c56bbbd9e5319b0017d555a1 to your computer and use it in GitHub Desktop.
So I don't forget
This file contains hidden or 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
| function joinObjs() { | |
| // loops through all arguments and joins them together | |
| const result = {}; | |
| for (var i = 0, j = arguments.length; i < j; i++){ | |
| Object.keys(arguments[i]) | |
| .forEach(key => result[key] = arguments[i][key]); | |
| } | |
| return result; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment