0
How to stop the code from going to the other step if the user didn't enter their name?
I want the code to stop the from going to the other function if the user didn't enter their name and to ask the user for their name again https://code.sololearn.com/WLNO3HU09doJ/?ref=app
4 Réponses
+ 3
let name = "";
while(!name){
name = prompt("enter your name")
}
+ 1
Vasiliy
Thanks
0
You can use 'required'.
0
Rajanit Nagajibhai Navapara
It is prompt not an input feild