--- id: 5ddb965c65d27e1512d44dab title: Step 18 challengeType: 0 dashedName: step-18 --- # --description-- The `reduce()` method takes a callback function with at least two arguments, an accumulator and a current value: ```js function(accumulator, currentValue) { /* code to run */ } ``` or using arrow functions: ```js (accumulator, currentValue) => { /* code to run */ } ``` Insert the above callback function as an argument in the `.reduce()` method. # --hints-- See description above for instructions. ```js assert( code .replace(/\s/g, '') .match(/reduce\(\(accumulator\,currentValue\)\=\>\{\/\*codetorun\*\/\}\)/) ); ``` # --seed-- ## --before-user-code-- ```html

Calorie Counter

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