Skip to content

Instantly share code, notes, and snippets.

@yesvods
Last active October 1, 2018 13:44
Show Gist options
  • Save yesvods/4c7251f060029c8a5b07 to your computer and use it in GitHub Desktop.
Save yesvods/4c7251f060029c8a5b07 to your computer and use it in GitHub Desktop.

Revisions

  1. yesvods revised this gist Aug 15, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    var obj1 = {name:"xiaoming", age: 23}
    var obj2 = {age: 33}
    var obj3 = {...obj1, ...obj2}
    const obj1 = {name:"xiaoming", age: 23}
    const obj2 = {age: 33}
    const obj3 = {...obj1, ...obj2}
    //obj3 ==> {"name":"xiaoming","age":33}
  2. yesvods created this gist Aug 15, 2015.
    4 changes: 4 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    var obj1 = {name:"xiaoming", age: 23}
    var obj2 = {age: 33}
    var obj3 = {...obj1, ...obj2}
    //obj3 ==> {"name":"xiaoming","age":33}