Adventure Part 2 5/6 Unexpected Token ILLEGAL


#1

I don't understand, here is my code:

var user = prompt("You are a member of the Uchiha Clan and a mysterious figure, whom has been following you for days, finally confronts you in a dark alley. Do you RUN from the danger, ready your SHARINGAN, or OBSERVE?".toUpperCase());
switch (user) {
case 'sharingan':
var sharingan = prompt("You focus your chakra and activate your Sharingan. You notice the insignia on his robe as the organization that hunts down the Uchiha for their eyes. You attempt to get him in a genjutsu, is your genjutsu strong? (yes or no)");
if (sharingan === "yes") {
console.log("You trap the figure in your genjutsu. You immediately learn of his mission and it disgusts you. While he's charmed, you throw a shuriken and lodge it in his throat. The figure bleeds out") }
else {
console.log("The figure breaks your genjutsu at the last second and kicks you in the face. He is fast, and as you recover, he throws shuriken your way. You dodge him, shoot fire, and escape in the flames.)
}
break;
case 'run':
var run = prompt("You attempt to run but the figure immediately jumps high in the air and blocks your exit. Are you fast? (yes or no)");
if (run === "yes") {
console.log("With your speed, you defeat the figure in Taijutsu and knock him out. You decide to take him to the Clan.")
}
else {
console.log("You are not quick enough and the figure gets the best of you. You awake in an unknown room and fingers fill your eye sockets. You have died.")
}
break;
case 'observe':
var observe = prompt("You observe your target and notice the emblem on his cloak. This individual is part of the organization that hunts the Uchiha for their eyes. You ready a shadow clone and begin to attack, did you distract him with your clone? (yes or no)");
if(observe === "yes") {
console.log("The distraction was enough to get the upper hand and knock him out. You will interrogate him."); }
else { console.log("The figure doesn't fall for it and goes after you. Anticipating this, you throw a smoke bomb and flee.");
}
break;
default:
console.log("That command is unknown.");
break;
}


#2

You are not supposed to have the .toUpperCase(); inside the prompt. Instead, you must put it right next to the prompt, like this:

var user = prompt("You are a member of the Uchiha Clan and a mysterious figure, whom has been following you for days, finally confronts you in a dark alley. Do you RUN from the danger, ready your SHARINGAN, or OBSERVE?").toUpperCase();

Also, try setting all your answers to lower case, like this (it's not needed, but it is important):

var sharingan = prompt("You focus your chakra and activate your Sharingan. You notice the insignia on his robe as the organization that hunts down the Uchiha for their eyes. You attempt to get him in a genjutsu, is your genjutsu strong? (yes or no)").toLowerCase();


#3

never mind I fixed it!