// Should use `Object.values`
for (const key of Object.keys(foo)) {
bar(foo[key]);
}
// Should use `Object.entries`
for (const key of Object.keys(foo)) {
bar(foo[key], key);
}
// Should use `Object.values`
const foo = Object.keys(bar).map(key => baz(bar[key]));
// Should use `Object.entries`
const foo = Object.keys(bar).map(key => baz(bar[key], key));
// Should use `Object.keys`
for (const [key] of Object.entries(foo)) {
bar(key);
}
for (const key of Object.keys(foo)) {
foo[key] = 'new value';
delete foo[key];
foo[key]++;
}
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