12. or


#1


Replace this line with your code.


#2

var tired = true;
var bored = false;

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


#3

What are you having trouble with? What errors are you getting?


#4

hello,where is problem??


#5

If you get rid of this section in your code it works fine. Just pasted it into my lesson and it passed.


#6

SyntaxError: Unexpected token else


#7

Oops, try again. It looks like your function doesn't return true when tired is true and bored is false.


#8

var tired = true;
var bored = false;

var nap = function() {
  if(tired===true || bored===true){    
      return true;
  }else{      
        return false;
  }
  };

That extra } and respacing should do the trick. Passed it after fixing the errors


#9

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