Lessong 12 : OR operator


#1


hello all,
am stuck with the below lesson and i don't know exactly am doing wrong


Lesson 12

the error code :

Oops, try again. Make sure to set bored to the opposite of tired (that is, if tired is true, bored should be false).

// Declare your variables here!
var tired = true;
var bored = true;

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


#2

They say "Make sure to set bored to the opposite of tired (that is, if tired is true, bored should be false)" but you have declared tired and bored to the same value...


#3

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