Stuck on this exercise


#1


Hi my code doesnt work, can understand why

https://www.codecademy.com/en/courses/javascript-beginner-en-qDwp0/2/3?curriculum_id=506324b3a7dffd00020bf661


// 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);


#2

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


#3

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


#4

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.


#5

solved thank you so much


#6

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