Skip to content

Commit b5f110a

Browse files
author
Gonzalo Diaz
committed
[REFACTOR] ESLint manual fixes: ".forEach( () => {} )" replaced by "for...of".
1 parent 8164eee commit b5f110a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/projecteuler/problem0019.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,15 @@ export function problem0019(
1818
const leap = (y % 4 === 0 && y % 100 !== 0) || y % 400 === 0 ? 1 : 0;
1919
daysInMonth.FEBRUARY = 28 + leap;
2020

21-
Object.entries(daysInMonth).forEach(([month, days], index) => {
22-
console.debug(`Month(${index}): ${month} | days: ${days}`);
23-
21+
for (const days of Object.values(daysInMonth)) {
2422
accumulatedRemainder += days % 7;
2523
if (accumulatedRemainder % 7 === _dayOfWeek) {
2624
if (y <= _sinceYear) {
2725
excess += 1;
2826
}
2927
resultCount += 1;
3028
}
31-
});
29+
}
3230
}
3331

3432
console.log(`result ${String(resultCount)}`);

0 commit comments

Comments
 (0)