Example 6-2. Object destructuring


var position = {x: 50, y: 100};
var {x, y} = position; // destructuring
console.log(x); // 50
console.log(y); // 100