ES6 Object Spread Properties

JS
S
JavaScript

Object Spread Properties example.

1// Object Rest Properties (direct mapping + the rest)
2var {a, b, c, ...the_rest} = {a: 1, b: 2, c: 3, x: 4, y: 5, z: 6};
3console.log(a); // 1
4console.log(b); // 2
5console.log(c); // 3
6console.log(the_rest); // { x: 4, y: 5, z: 6 }

Created on 6/14/2017