Using While loop to check user input
|
|
<html> <head> <title>Using While loop to check user input</title> <script> var correct = "AA"; var guess = ""; while (guess != correct){ guess = prompt ("Question?", ""); if (guess == correct){ alert ("Correct"); } else { alert ("that's not it..."); } }
</script> </head> <body> </body> </html>
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
|