ECMAScript 2015 Destructuring and Spread
ECMAScript 2015 Destructuring and Spread
Destructuring
Destructuring is a way to unpack values from arrays, or properties from objects, into its own variables.
var o = {p: 42, q: true}; var {p: foo, q: bar} = o; console.log(foo); // 42 console.log(bar); // true
Spread
Spreadallows collection to be expanded in places where zero or more arguments are expected (in function), or elements are expected (in array literals), or key-value…
View On WordPress














