File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -687,9 +687,11 @@ const programmerOutput = [
687687
}
688688
];
689689

690+
const INITIAL_VALUE = 0;
691+
690692
const totalOutput = programmerOutput
691693
.map((programmer) => programmer.linesOfCode)
692-
.reduce((acc, linesOfCode) => acc + linesOfCode, 0);
694+
.reduce((acc, linesOfCode) => acc + linesOfCode, INITIAL_VALUE);
693695
```
694696
**[⬆ back to top](#table-of-contents)**
695697

0 commit comments

Comments
 (0)