i use the airbnb eslint rules and there is a strange warning “prefer-destructuring”
const A = {name: 'Name A', id: 10, team: [10, 10] };
const B = {name: 'Name B', id: 20, team: [20, 20] };
A.team[0] = B.team[0]; // eslint: Use array destructuring; BUT HOW?
console.log(A, B);
I know, a bit, how does the array destructuring work but not in this example. I could avoid the warning by using
let temp = B.team[0];
A.team[0] = temp;
But it is a bit strange, Any advices? Thanks