Javascript: Do While Loop
The do while loop is almost the same as the while except that the condition is not tested until after the code block is evaluated.
var password = "secret";
do{
var test = prompt("what is your password?");
}while(test != password);