This probably sounds stupid, like "Is this guy even trying?" stupid. But I am, desperately, trying. Everything Iv'e searched only shows me how to write a function, not call it back.
var choice1 = function(){
var choice = 5
while(choice != "n" || "s") {
document.write("<p>There's a door norh of which you sit, south is a small window with a slight breeze coming through</p>");
document.write("<p> north: door south: window</p>");
choice = prompt("north or south");
if(choice == "n" || "south"){
document.write("<p>You stand up, aching in your joints you grunt. Inspecting the door you see, what seems to be, a large iron grated cell door? ''Why would I be in a cell?'' you think to yourself.</p>")
break
}else if(choice == "s" || "south"){
document.write("<p>You stand up, aching in your joints you grunt. Inspectig the window</p>");
break
}else if(choice != "n" || "s" || "noth" || "south") {
document.write("<p>Please pick one of the paths</p>");
};
};
};
function choice1()
This is what I have, it works because I've tested with not being in the function but I cant get it to invoke the function.
To call the function, just do:
choice1();