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
Joshua Tuddenham -
Daksh Kataria -
ym qu -
Pascal Kleindienst -
Top comments (1)
Using the rest operator ..., you can store all remaining properties from the original object to a variable.