Learn Form Validation by Building a Calorie Counter - Step 34

Tell us what’s happening:

can’t find the right command to complete the request. Thought I had it with this last try.

Your code so far

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

/* file: styles.css */

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

function isInvalidInput(str) {
  const regex = /\d+e\d+/i;
const result = str.match(regex);
return result;
}

// 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/133.0.0.0 Safari/537.36 Edg/133.0.0.0

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 34

Hi,
you don’t need to make a new result variable and then return that. Just directly return the result of the .match() on your regex.
Good luck!