Logical operators


#1



I am not sure how to create the if else statement...

Replace this line with your code. 
var user = prompt("What kind of animal are you? Are you an Alligator,Monkey, or Donkey?").toUpperCase();

switch (user) {
    case 'Alligator':
        console.log("its going down then");
        break;
    case 'Monkey':
        console.log("You must enjoy bananas");
        break;
    case 'Donkey':
        console.log("Dont be foolish");
        break;
    default:
    console.log("I dont think so buddy");
}


#2

If... else statements are set up like

if(condition){
 statement
} else if(condition2){
statement
} else {
 statement }

#3

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