Last active
June 14, 2020 19:47
-
-
Save michaelmcshinsky/61fdfed0151d0083052ae9a27b041982 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 = {…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