I am adding this answer because none of the answers used Comma operator.
It's very easy with destructuring assignment and the ,
operator:
const object = { a: 5, b: 6, c: 7 };
const picked = ({a,c} = object, {a,c})
console.log(picked);
I am adding this answer because none of the answers used Comma operator.
It's very easy with destructuring assignment and the ,
operator:
const object = { a: 5, b: 6, c: 7 };
const picked = ({a,c} = object, {a,c})
console.log(picked);
For further actions, you may consider blocking this person and/or reporting abuse
Bytevillage -
Saurav Jain -
JAYASUDHI J IT -
YUVASRI B IT -
Top comments (0)