Tell us what’s happening:
function isInvalidInput(str) {
const regex = /[0-9]e/i;
}
I get an error message saying "You should add the [0-9] character class after ‘e’ in your regular expression. After I changed it I get vise versa error (ie. [0-9] should be BEFORE ‘e’). Idk what I’m missing. Tried adding ‘e’ at the beginning and end.
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
function isInvalidInput(str) {
const regex = /[0-9]e/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