--- id: 5e302e80e003129199103c78 title: Step 21 challengeType: 0 dashedName: step-21 --- # --description-- To track how the `reduce()` function works, log the values of the `accumulator` and `currentValue` in the callback function before the `return` statement like this: `console.log({ accumulator })` You can also check your progress by adding `console.log({ total })` at the end of the `calculate()` function. When you enter calorie values in the form and push the Calculate button, you will see the values of `accumulator` and `currentValue` in each iteration of the `reduce()` callback function. # --hints-- See description above for instructions. ```js assert(code.replace(/\s/g, '').match(/console.log\({accumulator}\)/)); ``` # --seed-- ## --before-user-code-- ```html

Calorie Counter

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