var user = prompt(“You got lost when you went on a picnic with your friends. You are all alone in the wilderness.There is a storm coming. Do you FINDSHELTER, CYCLE through the storm, or IGNORE it?(Only enter the highlighted words, including findShelter.)”); user = user.toUpperCase(); switch(user){ case ‘FINDSHELTER’: var decision = prompt((“Okay, you try to find a cave but it is occupied! Will you ignore the resident, attack the resident, or find another shelter?”)); if (‘ignore’ === decision) { console.log(“You are knocked out from the pain of nature’s ambush. The storm hits you directly. Bye-bye, haunted picnicker.”); } else if(‘attack’ === decision) { var decision2 = prompt(“You are no match for the power of nature. You will need a weapon. You see a pair of sticks they look like they could work as tonfas. You also see a stick resembling a slingshot, that might be useful. You also noticed a pile of rocks. Which one will you use?”); if (“tonfas” && “stick” === decision2) { console.log(“Using physical attack and not ranged attacks is what caused your downfall. Bye-bye, haunted picnicker.”); } else if (“slingshot” && “stick” === decision2){ console.log(“You were right about keeping your distance. Ranged attacks is what influenced your escape. You live another day.”); } else { console.log(“You pick up a rock but notice larvae growing on them. They quickly crawl across your arm. Bye-bye, haunted picnicker.”); } } break; case ‘CYCLE’: var decision3 = prompt(“You are not in luck! The storm already surfaced and made it unsafe to cross. An aftermath storm is approaching so will you, move on your feet or call for help?”); if (“Moving on feet” || “running” === decision3) { console.log(“The harsh winds are more than you can handle. Bye-bye haunted picnicker.”); } else { console.log(“No reception. Luckily that was not the kind of call I meant. His friends quickly heard the bird call and aided you. You and your friends are bird-watchers, how convenient!”); } break; case ‘IGNORE’: console.log(“There was no point in killing yourself, was there? Maybe you should’ve just stayed with your friends.”); break; default: console.log(“I’ll just end this for you right here. Reset and try another choice.”); }