const Baby = {
name: 'Tabby',
favColor: 'brown',
Age: 21
};
const {name, ...rest } = Baby;
console.log(name); // 'Tabby'
For further actions, you may consider blocking this person and/or reporting abuse
const Baby = {
name: 'Tabby',
favColor: 'brown',
Age: 21
};
const {name, ...rest } = Baby;
console.log(name); // 'Tabby'
For further actions, you may consider blocking this person and/or reporting abuse
Devtonian -
Aditya Pratap Bhuyan -
Arthor Jackson -
Ihtisham-Ul-Haq Shami (Fa-2022-BSCS-246) -
Top comments (1)
Using the rest operator ..., you can store all remaining properties from the original object to a variable.