Also coming to ES6 is destructuring objects:
function doSomething(aObj) {
let { x, y } = aObj;
}
doSomething({ x: 1, y: 4 }) function doSomething(aObj) {
let { x, y } = aObj;
}
doSomething({ x: 1, y: 4 })No comments yet.