Switch goes to default


My code continues to go to default response. I have tried the upper and lower case options, changing all my cases accordingly. Even when removing upper and lower case the issue persists.

var user;
var answer = prompt("Are you ready to join Vox Machina? Let's fight the dragon. How do you fight it? Choose cast a spell, stab, or cutting words.");
switch (user) {
    case 'cast a spell':
        console.log("The dragon is blinded by your magic.");
        case 'stab':
            console.log("You can't break through dragon hide.");
            case 'cutting words':
                console.log("You have distracted the dragon.");
                console.log("That's not how you fight a dragon.");


You stored the user's response in a variable called answer, but then your switch asks for the user variable. Why two variables anyways? :slight_smile:


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