-
-
Save fernandovega/4b19197c384f35f52686c30a133965d7 to your computer and use it in GitHub Desktop.
Merge Object with ES7 object spread
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
const obj1 = {name:"xiaoming", age: 23} | |
const obj2 = {age: 33} | |
const obj3 = {...obj1, ...obj2} | |
//obj3 ==> {"name":"xiaoming","age":33} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment