--- id: 5e302e8ce003129199103c79 title: Step 22 challengeType: 0 dashedName: step-22 --- # --description-- Now let's simplify the `reduce()` callback function by refactoring it. Essentially, the current callback function is `(accumulator, currentValue) => { return accumulator + currentValue }`. Since there's only one expression in the function body, we can omit the `{}`. Additionally, we can omit the `return` keyword since that is implicit when using arrow function syntax. So the function can be simplified to just `(accumulator, currentValue) => accumulator + currentValue`. Replace the current callback function argument in the `reduce()` function with the simplified callback function from above. # --hints-- See description above for instructions. ```js assert( code .replace(/\s/g, '') .match( /reduce\(\(accumulator\,currentValue\)\=\>accumulator\+currentValue\,0\)/ ) ); ``` # --seed-- ## --before-user-code-- ```html

Calorie Counter

Sex
Breakfast
Lunch
Dinner
``` ## --after-user-code-- ```html ``` ## --seed-contents-- ```html ``` # --solutions-- ```html ```