const foo = index >= 0 ? array[index] : undefined;
const foo = index < 0 ? undefined : array[index];
const foo = index <= array.length - 1 ? array[index] : undefined;
const foo = index > array.length - 1 ? undefined : array[index];
const foo = index >= 5 ? array[index - 5] : undefined;
const foo = array[index];
const foo = index >= 0 ? array[index] : bar;
I'm not sure if we should add this to no-useless-undefined
or add a new rule.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too