Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var user = prompt("You have been approached by a mugger. Do you run, oblige, or fight?").toUpperCase();
- switch(user){
- case 'RUN':
- var run = prompt("Are you athletic?")
- if( run === "yes"){
- console.log("You made it away");
- }
- else{
- console.log("He caught up to you!");
- case 'OBLIGE':
- console.log("You better call your credit card companies and cancel them!");
- break;
- case 'fight':
- console.log("Damn, tough guy over here");
- break;
- default:
- console.log("That wasn't one of the options");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement