You are on page 1of 1

I think the idea there is not to repeat yourself. You're calling prompt twice.

You can
overcome this by declaring the variable that will be defined in the loop later.
Also, make sure you terminate your statements in JS with semicolons.
var secret;

do { secret = prompt("What is the secret password?");


} while ( secret !== "sesame" );

document.write("You know the secret password. Welcome.");

You might also like