exercise 2.3
This commit is contained in:
parent
b3572cb595
commit
10daad2d87
|
@ -15,6 +15,7 @@ const Content = ({ parts }) => {
|
|||
}
|
||||
|
||||
const Sum = ({ parts }) => {
|
||||
// Already used reduce :3
|
||||
const total = parts.reduce((acc, currVal) => acc + currVal.exercises, 0)
|
||||
return (
|
||||
<b>The total number of execrcises is {total}</b>
|
||||
|
|
Loading…
Reference in a new issue