Closed
Description
- Version: v6.3.0
- Platform: Linux 4.4.0-64-generic x86_64 GNU/Linux
- Subsystem:
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;
});