All On Your Own - Missing Name After . Operator


More on Control Flow in JS: All On Your Own

SyntaxError: missing name after . operator

var q = prompt("What's coming down the road?");

switch(q) {
    case "crabmab":
        console.log("Oh no!");
    case "zombie":
        console.log("RUH ROH!");
    case "dragon":
        console.log("That's not a monster... It's a PC!");


delete the extra "." inbetween log and (


There is a stray full stop (period) that should be removed.


you shouldn't have a "." after the semicolon either.


Thanks to both you and MTF -- I removed the full stop after the console log and that did the trick. ...Curiously, that period at the VERY END isn't in my code, but when I copy it into a question (just tried it), the period renders. And there isn't a period after the backticks. Huh. Thanks guys!!!


no problem I'm happy to help.


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