Learn Form Validation by Building a Calorie Counter - Step 88

Tell us what’s happening:

I keep getting an error. I don’t know what should I change. My code so far:
calorieCounter.addEventListener(submit);
calculateCalories();

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

calorieCounter.addEventListener(submit);
calculateCalories();

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 88

Look at line 87 to see an example of how to add an event listener.
Try to use that to help you write the correct code. Let us know if you are still stuck and what changes you made.

thanks a lot! It worked

1 Like