SyntaxError: unterminated string literal -- what does this mean?


SyntaxError: unterminated string literal

var user = prompt("Are your shoes GREEN, YELLOW, or PURPLE?").toUpperCase();
switch (user) { 
   var tree = prompt("Do you want a tree (YES or NO)?").toUpperCase();
   var plant = prompt("Do you want a plant?").toUpperCase();
   if(tree === "YES" || plant === "YES") {
       console.log("You win your choice!");
   else {
       console.log("You can't win both! Go back and pick tree or plant.");
   var happyFaceSticker = prompt("Happy Face sticker (YES or NO)?").toUpperCase();
   var yellowSilkScarf = prompt("Yellow silk scarf?").toUpperCase();
   if(happyFaceSticker === "YES" || yellowSilkScarf ==="YES") {
       console.log("Excellent choice! We'll mail it to you.");
   else {
       console.log("You can only have one. Select the happy face or the scarf.");
   var purpleRainAlbum = prompt("Purple Rain Album (YES or NO)?").toUpperCase();
   var standUp = prompt("Standup of Prince?").toUpperCase();
   if(purpleRainAlbum === "YES" || standUp === "YES") {
       console.log("Your choice will be mailed tomorrow.");
   else {
       console.log("Select the album or the stand up.);
     console.log("I didn't understand your choice. Select a shoe color.");


console.log("Select the album or the stand up.); // here you didn't close string


Thank you. I see it now.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.