Learn Form Validation by Building a Calorie Counter - Step 33

Tell us what’s happening:

it is not going through. i have done all i can and nothing else

Your code so far

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

/* file: styles.css */

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

function isInvalidInput(str) {
  const regex = /\d[eE]\d/;

}




// 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/140.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 33

Hi @Anitadaeze and welcome to our community!

This is the regex which you start with in this step:

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

There is a shorthand character class to match any digit: \d. Replace your [0-9] character classes with this shorthand.

So, hit the Reset button to restore the starting code for this step and then do precisely what’s instructed, without making any other modifications to the regex.