Logical Operators .Or


#1

var tired=true;
var bored=false;

var nap = function() {
  // Add your if/else statement here!
  if(tired || bored) {
      return true; 
  } else {
    return false; 
  }  
};

where is the problem? Please,help!


#2

Hi valeriaf,

In the exercise, your code works. What error are you getting?


#3

hi, "SyntaxError: Unexpected identifier "and "Oops, try again. There was a problem with your syntax."


#4

I think you are using some different code than what you have shown in the above post, because your code above certainly does not generate any error.


#5

thank you :slightly_smiling: