Skip to content

Commit 1d7362d

Browse files
author
Vladimir Karamyshev
authored
Replace map method with object destructuring
1 parent ea0e4a8 commit 1d7362d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,7 @@ const programmerOutput = [
708708
const INITIAL_VALUE = 0;
709709

710710
const totalOutput = programmerOutput
711-
.map((programmer) => programmer.linesOfCode)
712-
.reduce((acc, linesOfCode) => acc + linesOfCode, INITIAL_VALUE);
711+
.reduce((acc, { linesOfCode }) => acc + linesOfCode, INITIAL_VALUE);
713712
```
714713
**[⬆ back to top](#table-of-contents)**
715714

0 commit comments

Comments
 (0)