Menu
This code is shorter and concise:
[code]
var guess; // x
number = “loose” // value
while(number != guess){ // while(value != x)
guess = prompt(“Pick a loose or noose”, “”)
}
My first attempt was more like this:
[code]
var status = prompt(“Pick a loose or noose”, “”);
if(status == “loose”){ alert(“Your a lili *****”)}
else
{
var status = prompt(“Pick a loose or noose”, “”);
}
So the while loop keeps it repeating until I get it correct while the if..else will not. So I would probably have to put a loop somewhere in the else branch for it to keep quessing then?