Stuck on this exercise


Hi my code doesnt work, can understand why

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

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

nap (tired, bored);


There are no parameters in the function so no arguments in the function call. The function is accessing the global variables.


hi i deleted the nap() line, but doesnt work yet


Create two variables, tired and bored, and set one equal to true and the other equal to false. (It doesn't matter which is which.) Inside the nap function, create an if statement that returns true if either tired or bored (or both!) are true, and false otherwise.


solved thank you so much


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