You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Such code fails in node, but works fine in chrome console:
const myConst = 'c';
const arr = [{ c: 10 }];
arr.every(({ [myConst]: n }) => n !== undefined)
Also, if you add one more statement with destructuring binding inside lambda, everything works fine.
const myConst = 'c';
const arr = [{ c: 10 }];
arr.every(({ [myConst]: n }) => n !== undefined);
arr.every((el) => {
const { [myConst]: num } = el;
return num !== undefined;
});
The text was updated successfully, but these errors were encountered:
Such code fails in node, but works fine in chrome console:
const myConst = 'c';
const arr = [{ c: 10 }];
arr.every(({ [myConst]: n }) => n !== undefined)
Also, if you add one more statement with destructuring binding inside lambda, everything works fine.
const myConst = 'c';
const arr = [{ c: 10 }];
arr.every(({ [myConst]: n }) => n !== undefined);
arr.every((el) => {
const { [myConst]: num } = el;
return num !== undefined;
});
The text was updated successfully, but these errors were encountered: