11. And, I dont see the problem here


#1


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


When I click to submit the code, it says "Oops, try again. It looks like your function doesn't return false when hungry is false" however the excersice asks for both hungry and foodHere to be true


var hungry = true&&true
var foodHere = true&&true


var eat = function() {
  if(hungry && foodHere){
      return "true"}
      
      else
      
      { return "false"}
};

eat(hungry, foodHere)


#2

nevermind i figured it out


#3

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