8. All on your own


#1

All on your own

syntax error. don't know where I did it wrong?


var type = prompt("What's your favorite hamster type?);

switch(type) {
    
    case 'Robo' :
        console.log("That's my favorite too!");
    break;
    
    case 'Dwarf' :
        console.log("That's adorable!");
    break;
    
    case 'Panada bear' :
        console.log("lovely little creature!");
    break;
    
    default :
        console.log("That's not hamster!");
}


#2

You forgot to enclose (with quotes) your prompt's string.


#3

Thanks for the helping!


#4

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