Last active
November 28, 2020 18:10
-
-
Save Sanchithasharma/31c96ad9e5defa184a0e51db7fc2cfb8 to your computer and use it in GitHub Desktop.
Adding the property to the object using ES7
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
var list = | |
{ | |
name: 'Michael Scott', | |
company: 'Dunder Mufflin', | |
designation: 'Regional Manager', | |
show: 'The Office', | |
}, | |
new_obj = { ...list, partner: 'Holly Flax' } | |
console.table(new_obj) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment