Ok, so im a beginner, working with javascript. Im making a small game to impress my friends, and for some reason, this code isnt working. This is only part of my code, the part that has to deal with my it isnt working. When I run it, it doesn't go to the ELSE command, even if you dont type STAY, will someone tell me why? Here it is:
var qestionOne = prompt("An old man emerges from the shadows of the forest that you are currently standing in. Farther ahead, you can see that the forest breaks up, and the trees become less and less thick. If you squint, you can even see a small town. * Do you chose to either, STAY, and talk to the old man, or LEAVE, and continue down the path that you are following, and go to the town? *");
if (questionOne = "STAY") {
alert("The old man approaches you, and speaks. 'I must warn you, there is a trap at the end of this forest. Were the undergrowth thins,there is a horrable and evil sludge monster. Please, go around' The old man rasped. Thankfull for the information, you proceed your journey, and avoid a big portion of the forest ahead.");
} else {
alert("You travel ahead, down the path. You suddenlly become very hungry. You notice that the trees around you have very juicy looking fruit on the branches.You have never seen this type of food before, however, you are a..Fruit-toligist...and know that poiseness fruit have yellow and black stripes. You pluck one off of a nearby tree and hungrily munch into the foreign food. A loud screeching sound interupts your thoughts on filling your stomache, and directs your eyes behind you.");
}