Always returns the same response in console.log()?


I always get the same output from console.log(). It continues to give me the default response no matter WHAT my input is, even if it matches the cases I have created. Please help me identify the issue - have I missed a curly bracket or misplaced something? I can pass the activity but cannot actually get the correct output...

var user = prompt("What is your name?").toUpperCase();
switch(user) {
    case 'Casey':
        console.log("Hey, youre back!");
    case 'Anonymous':
    case 'John': 
        console.log("Welcome John!");
        console.log("Never heard of you before!");


var user = prompt("What is your name?").toUpperCase();

toUpperCase(); makes Casey to CASEY

And in your cases are no String CASEY, so you get the default


Oh yeah, thanks! That's it!


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