Learn Form Validation by Building a Calorie Counter - Step 31

Tell us what’s happening:

im not getting it can someone please explain what is expected

Your code so far

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

/* file: styles.css */

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

function isInvalidInput(str) {
  const regex = /[0-9\e]\[e\0-9]/i;
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 31

1 Like

Don’t overthink the instruction here. It says add [0-9] before and after “e” in your code.

Follow it exactly, nowt more or less. Reset your code to get it back to how it was.

3 Likes

basically repeat the 0-9 in wrap character class and put together in before and after the “e” regex;