Last active
June 14, 2020 19:46
-
-
Save michaelmcshinsky/7e8a22bc58c3e2ec7301f5570568587c to your computer and use it in GitHub Desktop.
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
let obj1 = { firstName: 'John', lastName: 'Doe', email: '[email protected]' }; | |
let obj2 = { email: '[email protected]', phone: '012–345–6789' }; | |
let obj3 = { city: 'Salt Lake City', state: 'Utah' } | |
let newObj = Object.assign({}, obj1, obj2, obj3); | |
// { | |
// firstName: 'John', | |
// lastName: 'Doe', | |
// email: '[email protected]', | |
// phone: '012–345–6789', | |
// city: 'Salt Lake City', | |
// state: 'Utah' | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment