Skip to content

Commit cb0f7d5

Browse files
authored
remove map method in favor functional programming
1 parent 445af32 commit cb0f7d5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,7 @@ const programmerOutput = [
706706
];
707707

708708
const totalOutput = programmerOutput
709-
.map(output => output.linesOfCode)
710-
.reduce((totalLines, lines) => totalLines + lines);
709+
.reduce((totalLines, output) => totalLines + output.linesOfCode, 0)
711710
```
712711
**[⬆ back to top](#table-of-contents)**
713712

0 commit comments

Comments
 (0)