Cant find my syntax error "unexpected identifier"


Getting a syntax error, I cant seem to find it.

This is in the lesson

Error message says SyntaxError: Unexpected identifier

var user = prompt("Welcome to the school of Magic. Do you choose Earth, \ Wind, Water, or Fire?").toUpperCase();

switch user {
    case 'EARTH':
        prompt("Great choice! Nothing as sure as the ground beneath your \ own two feet!");
    case 'WIND':
        prompt("Great choice! It takes a skilled mage to feel and \ understand the delcacies of the wind.");
    case 'WATER':
        prompt("Great choice! Water is a very versitile element, with it \ comes many challenges.");
    case 'FIRE':
        prompt("Great choice! Fire is as hard to control as wind, but much \ more deadly to the mage learning it's power. Be Careful!");
        Prompt("Not off to a great start are we? Inability to follow \  instructions WILL get you killed in mage training. Try again.");



switch user {

needs to look like this:
switch(user) {

I forgot the paranthesis :slight_smile: woops!


I was just coming to ya! xD Good find! Saved me a few typing words :stuck_out_tongue:


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