Where is my mistake, could anybody please explain?


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-ZA2rb/0/4?curriculum_id=506324b3a7dffd00020bf661

my code seems to be right, but in all of cases the answer turns default.

var user = prompt("If you had one wish, what would you choose? To have much money, to travel back in time or to ask for more wishes?").toUpperCase();

switch(user) {
    case 'to have much money':
        console.log("It's still limited and will end whenever");
      break;
    case 'to travel back in time':
        console.log("You'll be able to see more interesting things!");
      break;
    case 'to ask for more wishes':
        console.log("You're so sly!");
      break;
      default:
      console.log("Not a bad idea!");
};


#2

you are converting the user input to uppercase, and then compare it with lower sentences cases. String comparison is case sensitive. So, it is going to run the default case


#3

It worked out! Thanks ,man)