Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
Ventana (confirmar) bucle a la primera función en respuesta

Lo siento, soy nuevo en este sitio web. Estoy tratando de hacer que mi ventana (confirmar) solicite cuando un usuario hace clic en Aceptar, volverá a la primera función, ¿es esto posible? ¿Cómo haría esto?

 function fn() { let firstName=""; while(firstName==""){ firstName = prompt("Enter your first name:"); let lastName=""; while(lastName==""){ lastName = prompt("Enter your Last name:"); let gender=""; while(gender !== "Male" && gender !== "Female" && gender !== "m" && gender !== "f"){ gender = prompt("Male or Female?"); let ageYrs=""; while(ageYrs < 15 ||ageYrs > 100|| isNaN(ageYrs) == true){ ageYrs = prompt("What is your age?"); let pCode=""; while(pCode === '' || pCode.length <4 || pCode === null){ pCode = prompt("What is your postcode?"); let emplyStat=""; while(emplyStat !== "Employed" && emplyStat !== "Unemployed" && emplyStat !== "unemployed" && emplyStat !== "employed"){ emplyStat = prompt("Are you employed or unemployed?"); } } } } } } return firstName; } firstName = fn(); if (confirm("Press a button!")) { txt = "You pressed OK!"; } else { txt = "You pressed Cancel!"; } }
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!