i was trying to get my code right when i had to make a do while loop and i tried asking my user the capital of United States and the answer must be “Washington” so i needed to make it perform an action of restricting the user from making more than 3 trials, please anyone there who understand what i’m saying, I’m stalked
What have you tried so far?
Can you put an example in codepen?
<!DOCTYPE html>
<html>
<head>
<title>Working With Do While Loop</title>
</head>
<body>
<h1>Working With Do While Loop</h1>
<script>
do{
var answer = prompt("Capital Of United States?");
} while (answer != 'Washington');
</script>
</body>
</html>
Okay Randell, thank you so much