June 2018
Intermediate to advanced
348 pages
8h 19m
English
We have a new way to assign values to objects and arrays. Let’s look at some examples:
var [a, b] = ["hello", "world"];console.log(a); // "hello"console.log(b); // "world"var obj = { name: "Diego", lastName: "Arguelles" };var { name, lastName } = obj;console.log(name); // "Diego"var foo = function() { return ["175", "75"];};var [height, weight] = foo();console.log(height); //175console.log(weight); //75
Read now
Unlock full access