Can anyone tell me where I am wrong with this code? Its supposed to be a simple Question/Answer prompt with various routes based on answers. Just a forewarning I am a coding noob so Thank you ahead of time for helping me out!
var answer = prompt("Would you like to visit the Longneck or T-rex exhibit first?");
var enter = prompt("Welcome to Jurassic Park, are you ready for an adventure?");
if (enter == "yes"){
console.log("Ok, lets go!");
}
else{
console.log("Well too bad, we're already here.");
}
var exhibit = prompt("Would you like to visit the T-rex or the Raptor exhibit first?");
if( exhibit == "T-rex"){
console.log("Good choice, its actually feeding time... So exciting!");
}
var trex = prompt("Wow look at the T-Rex, it's right next to the fenc... OMG it just broke out!! Should we get out of the car and hide or stay in the car and try and drive away. Answer run or drive.");
if(trex == "drive"){
console.log("Good choice! Lets break off the track and drive toward the basecamp!");
}
var survived = prompt("You made it back to basecamp but the t-rex is on your ass! Do you run inside or run and hide in the jungle? Answer inside or jungle.");
if(survived == "inside"){
console.log("Nice you got in and locked the door, after a while the t-rex leaves and your helicopter rescue comes to the rescue. You survived this nightmare.");
}
else(survived == "jungle"){
console.log("The t-rex chases you down and you get eaten. You died a horribly gruesome death.")
}
else(trex == "run"){
console.log("The T-rex chases your group down and you die a horrible death")
}
else(exhibit == "Raptor"){
console.log("Nice! The raptors are some of our smartest dinosaurs");
}
var raptor = prompt("You made it to the raptor cage but as soon as you drive up you see the fence has been slashed open. Do you stay on the track that your automatically driving on or do you bust off the track and drive away as fast as you can? Answer stay or drive.")
if(raptor == "drive"){
console.log("You drive as fast you can but you are noticed by the raptors. They start to chase after you!")
}
var run = prompt("You get back to the basecamp but the raptors chased you all the way. Do you run inside and lock yourself in or run to the jungle and try to hide? Answer inside or jungle.")
if(run == "inside"){
console.log("You succesfully run inside and lock the door before the raptors can get you. They try for hours to get in but then run off. Your rescue helicopter comes and you survive.")
}
else(run == "jungle"){
console.log("The raptor smell you out and rip you and your friends into a million pieces and eat all of ya'll. You died a terrible death.")
}
else(raptor == "stay"){
console.log("You drive slowly passed the fence and immediately get noticed by the raptors. They claw their way in your car and eat you and all of you group.")
})