I suck at syntax apperantly?


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-qDwp0/1/4?curriculum_id=506324b3a7dffd00020bf661#

Another dumb syntax error? I can't find where the 'unexpected token :' is.

// Write your code below!
var bluh = prompt("Can you choose a number?")
switch(bluh) {
    case '1':
        console.log("Huh, okay."):
        break;
    
    case '2': 
        console.log("Alright."); 
        break;
    
    case '3': 
        console.log("Okay.");
        break;
    
    case '69':
        console.log("You found the scret input!");
        break;
        
    default: 
        console.log: ("can you choose a number listed?");
        break;
}
.


#2

here:

console.log("Huh, okay."):

you have a colon instead of a semi-colon at the end

and here:

 console.log: ("can you choose a number listed?");

after console.log you have an explainable colon


#3

oh, wow. thanks! i totally didn't even see that, lol.


#4

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