const Header = (props) => { const header = props.name return (
{name} {exercises}
) } const Content = (props) => { //const object_1 = props.parts.parts[0] //const object_2 = props.parts.parts[1] //const object_3 = props.parts.parts[2] const parts = props.parts return ( <> {parts.map((part) => { return (Number of exercises {parts.reduce((sum, part) => { return sum += part.exercises }, initialValue)}
) } const Course = (props) => { const header = props.course.name const parts = props.course.parts return ( <>