This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Description
We know we can get the rest entries of an object:
let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
x; // 1
y; // 2
z; // { a: 3, b: 4 }
But if the x, y is in an array, for example [ 'x', 'y' ], generated in runtime, I don't know those keys when coding, maybe we need this kind of syntax:
const keys = [ 'x', 'y' ];
// syntax error here, some new syntax is needed
let { ...keys, ...z } = { x: 1, y: 2, a: 3, b: 4 };
x; // 1
y; // 2
z; // { a: 3, b: 4 }