mirror of
https://github.com/alrayyes/wiki.git
synced 2024-12-01 15:26:23 +00:00
462 B
462 B
id | title |
---|---|
b817ea12-eeeb-4723-a90c-f016cdcdb866 | Destructuring Objects |
Introduction
Destructuring objects introduced in ES6. Rest Operator can also be used here.
Syntax
const saviour = { first: "Jonn", last: "Connor" };
const { f, l } = saviour;
console.log(saviour, f, l); // { first: 'John', last: 'Connor' } John Connor