Code Your Own Adventure 2 - "Unexpected token default"


Currently working on my code and it says that I have a syntax error that I cannot find. 
Please help!

var user = prompt("You accidentally sleep walk into another person's house. Do you stay, run, or walk upstais?").toUpperCase();
switch(user) {
    case "STAY":
        console.log("The owner of the house sees you downstairs! Do you fight, run, or talk?");
    case "RUN":
        console.log("You were never caught! But don't sleep walk into people's houses again!");
    case "WALK UPSTAIRS":
        console.log("You walk upstairs and are greeted by a very scary looking dog. Do you stand still, run, or fight?");
        while(user === default) {
            prompt("Please choose one of the three options.").toUpperCase();


Try without while loop in default section.


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