Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
You can do something like this: function take_input() { input = prompt(); switch (input) { case "1": //first choice break; case "2": //second choice break; case "3": //third choice break; default: take_input() } }
17th May 2019, 4:31 AM
Airree
Airree - avatar