オブジェクトの操作
const otherProps = { r:4, color:'red', };
const point = { x:100, y:80, ...otherProps, }
const {x,r,...others} = point;
console.log(x); //100
console.log(r); //4
console.log(others); //color:'red', y:80
const otherProps = { r:4, color:'red', };
const point = { x:100, y:80, ...otherProps, }
const {x,r,...others} = point;
console.log(x); //100
console.log(r); //4
console.log(others); //color:'red', y:80