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


#1



Hullo, I cannot solve this exercise. Please help. I do not know what I am doing wrong.


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


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


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

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


#2

It should be function() - takes no parameters.

Remove true||true because that makes no sense..


#3

I left the function blank : function()

I changed true||true to true||false but I still have the same error.


#4

@ponninja

@jibblyj said remove them, not change them...


#5

I apologize to both of you. I have figured it out. Thank you so much anyway.

@jibblyj