Skip to content

Commit e94afcf

Browse files
committed
Change literal for a constant
1 parent dd47a0d commit e94afcf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,9 +628,11 @@ const programmerOutput = [
628628
}
629629
];
630630

631+
const INITIAL_VALUE = 0;
632+
631633
const totalOutput = programmerOutput
632634
.map((programmer) => programmer.linesOfCode)
633-
.reduce((acc, linesOfCode) => acc + linesOfCode, 0);
635+
.reduce((acc, linesOfCode) => acc + linesOfCode, INITIAL_VALUE);
634636
```
635637
**[⬆ back to top](#table-of-contents)**
636638

0 commit comments

Comments
 (0)