JavaScript JavaScript Loops, Arrays and Objects Simplify Repetitive Tasks with Loops Create a `do...while` loop

Alex Lang
Alex Lang
1,110 Points

What am I doing wrong?

var secret Do { secret = prompt("What is the secret password?");
} while ( secret !== "sesame" ); document.write("You know the secret password. Welcome.");

script.js
var secret
Do {
  secret = prompt("What is the secret password?");    
} while ( secret !== "sesame" );
document.write("You know the secret password. Welcome.");
index.html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JavaScript Loops</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 47,285 Points

The d in do is lowercase. Make that change and you should pass.