Skip to content

Commit 35f5c5c

Browse files
Merge pull request ryanmcdermott#137 from MarcAragones/apply_searchable_name
Change literal for a constant
2 parents 62dfd20 + e94afcf commit 35f5c5c

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
@@ -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)