Created
September 5, 2016 14:07
-
-
Save paulkoegel/ef31d2f1239b46d287e040b9e31ab175 to your computer and use it in GitHub Desktop.
object-spread.js
This file contains 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 young_jim = {age: 20, name: "Jim", last_name: "Beam", guns: "many"}; | |
const married_jim = { age: 34, name: "Jim", last_name: "Parker", hair: false }; | |
const joined_jim = {...young_jim, ...married_jim}; | |
console.log(joined_jim); // => { "age": 34, "guns": "many", "hair": false, "last_name": "Parker", "name": "Jim" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment