Re-execute TRY if CATCH gives error

0

Well, that's it, I need that if the catch goes away, the try in loop plan is executed again.

    try{

miFuncion();

}catch(Error){

    alert("¡Introduce un número entre 1 y 99!");

};
    
asked by Von Bismarck 22.10.2018 в 21:58
source

1 answer

1

You may prefer to use a loop instead of a try catch

do {
 alert("¡Introduce un número entre 1 y 99!");
}
while(!miFunction())
    
answered by 22.10.2018 в 22:25