Learn Form Validation by Building a Calorie Counter - Step 35

Tell us what’s happening:

In questo esercizio non ho capito proprio niente, nemmeno quello che si deev fare! in ogni caso ho fatto un tentativo

Your code so far

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

ATTENZIONE

Il codice seed della sfida e/o la tua soluzione hanno superato la lunghezza massiama che possiamo importare dalla sfida.

Dovrai fare un passo in più in modo che il codice che hai scritto abbia un formato semplice da leggere.

Copia/incolla tutto il codice mostrato nell’editor della sfida da dove ti sei appena collegato.

Sostituisci queste due frasi con il codice copiato.
Si prega di lasciare la linea ``` sopra e la linea ``` sotto,
perché consentono al codice di disporsi correttamente nel post.

Your browser information:

Lo user agent è: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 35

Hey @MaryGothic
You need to do two things here
1.you function needs to return something
which in this case the parameter that was passed to the function (str).add .match() to it.
2.Pass regex variable to it…match is a method which is just another name for functions in an object so they can take arguments,so you need to pass the regex variable to the method .match()

Happy coding

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.