my linter is giving me trouble about destructuring.
When I'm trying to destructure, it makes me an error, like in the following snippet :
const data = {
status: 'example',
};
let status = 'foo';
{
status,
} = data;
console.log(status);
Is there any ways to use destructuration when the variable already exists?
Using let
again :
const data = {
status: 'example',
};
let status = 'foo';
let {
status,
} = data;
console.log(status);