-
-
Save ilearnjavascript/c6459054d7559f0966257a19765301c6 to your computer and use it in GitHub Desktop.
es6 - new methods - 15.js
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
var obj1 = { a: 1, b: 1, c: 1 }; | |
var obj2 = { b: 2, c: 2 }; | |
var obj3 = { c: 3 }; | |
var mergedObj = Object.assign({}, obj1, obj2, obj3 ); | |
console.log(mergedObj); | |
// outputs: { a: 1, b: 2, c: 3 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment