Created
December 29, 2017 21:10
-
-
Save L2L2L/5c0533bb4e9f6dcb206bbd834f00a88e to your computer and use it in GitHub Desktop.
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 o = {arr:[1,2,3], obj:{a:1,b:2,c:3}}; | |
const foo{arr:a,obj:o} = o;//making it easy to transfer data from one object to another | |
console.log(foo);//foo = {a:[1,2,3],o:{a:1,b:2,c:3}} | |
const bar = {baz:"foo",foo:"bar",bar:"baz"}; | |
const poo = Object.assgin({},bar);//this would be okey if it offer filter in it their argument | |
const poo = Object.assgin({},bar,["baz","foo"]); | |
poo//{baz:"foo",foo:"bar"} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment