8. "SyntaxError: Unexpected token :" Need HELP


#1


Hi,

I can not find the error in my code

Can you help me ?

link to the exercise https://www.codecademy.com/en/courses/javascript-beginner-fr-FR-b3xz8/1/4?curriculum_id=5355c2b7516bcbd912000008


var bonbon = prompt("Quel est ton bonbon favoris ?","Ecris le ci-dessous");

switch(bonbon)
{
    case 'Dragibus':
        console.log("Les meilleurs !");
         break;
    case 'Réglisse':
        console.log:("Ca va!");
         break;
    case 'SKitlles':
        console.log("Beurk!");
         break;
    default:
        console.log("Ce n'est pas une réponse!");
         break;
}


#2

here:

console.log:("Ca va!");

for some reason you added a colon after console.log, remove the colon


#3

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