Before statement


#1


I get this message in the preview box: 'SyntaxError: missing before statement'. what is a before statement?


https://www.codecademy.com/en/courses/javascript-beginner-en-ZA2rb/0/2?curriculum_id=506324b3a7dffd00020bf661#


Oops, try again. There was a problem with your syntax. AND SyntaxError: missing before statement


Replace this line with your code. 
var answer = prompt("What do you want to PLAY GOLF, or TAKE A WALK.").toUpperCase();

switch (answer){
    case'PLAY GOLF': 
        var clubs = prompt("Do you have golf clubs (YES or NO)?").toUpperCase();
        var shoes = prompt("Do you have golf shoes (YES or NO)?").toUpperCase();
        if(clubs=='YES'&&shoes=='YES') {
            console.log("GREAT! We can play a round of golf today!");
        } else { 
            console.log("Sorry, you must have your own clubs and shoes.  Maybe another time.");
        }
    break;
    case'TAKE A WALK': 
        var water = prompt("Do you have a water (YES or NO)?").toUpperCase();
        var hiking stick = prompt("Do you have a hiking stick (YES or NO)?")
            .toUpperCase();
        if(water=='YES'||stick=='YES'){
        console.log("Good, we can take a walk today.");
        
        } else {
          console.log("To take a walk, you need a water bottle or a hiking stick.");
        }
    break;
    default: 
        console.log(I'm not sure what you are choosing.  Click "RUN" and select play golf or take a walk."); 
    }


#2

@lodum

Surround what you put in parameter for console.log() with quotes


#3

Hi and here

var hiking stick = prompt("Do you have a hiking stick (YES or NO)?")
            .toUpperCase();

Space arent't allowe so you should remove the space between hiking and stick (_) also put the .toUpperCase() just after the )


#4

Thank you -- I made those corrections.


#5

Thank you for your help -- I made the corrections.