6 U DID IT SyntaxError: unterminated string literal


#1

var choice = prompt("You want to be a web developer,Do u want to go to college,self taught,give up).toUpperCase();

switch(choice) {
case 'Go to college':
var rich = prompt("Nice try!Do u have money(YES OR NO)?").toUpperCase();
var poor = prompt("Are u poor?").toUpperCase();
if (rich === "YES" || poor === "YES") {
console.log("You have no problem go to college");
} else {
console.log("You should save u money!")
}
break;
case 'self taught':
var fast = prompt("Are u learning quckly(YES OR NO)?").toUpperCase();
var slow = prompt("Are u slow to learn?").toUpperCase();
if (fast === "YES" && slow === "YES") {
console.log("Wow,You can teach yourself at home");
} else {
console.log("You need a teacher");
}
break;
case 'give up':
var fine = prompt("Are u kidding me(YES OR NO)?").toUpperCase();
var OK = prompt("Are u ready to let it go").toUpperCase();
if(fine === "YES" && ok === "YES") {
console.log("You can study something else");
} else {
console.log("Practice more");
}
break;
default:
console.log("What are u talking about");
}


#2

Missing end quote on string literal.


#3

You also forgot to break; your default switch.


#4

default: is its own break, falling where it does at the end of the switch body.


#5

break;
default:
console.log("What are u talking about");
}
BREAK IS HERE


#6

switch (expression) {
case a: break;
case b: break;
case c: break;
case d: break;
default: //
}