I am trying to add a delay to a loop where the prompt asks the user a question, and repeatedly asks the same question, until the correct answer, "yes" is entered. I then would like the loop to repeat after about a minute or so. I tried to look this up elsewhere, but can't seem to figure out how to properly input setTimeout or setInterval to my code. Any help would be appreciated
code:
`var answer= prompt(" (yes/no)");
while(answer.indexOf("yes") === -1) {
var answer= prompt("type yes to continue");
}
alert("Welcome!")`