Skip to content

Commit 6b90694

Browse files
Merge pull request ryanmcdermott#228 from vokar97/vokar97/replace-map-with-destructuring
Replace map method with object destructuring
2 parents ea0e4a8 + 1d7362d commit 6b90694

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