I need a help please


#1


Replace this line with your code.


#2

HI can you put your code and the error you get?


#3

var hungry=true;
var foodHere=true;

var eat = function() {
// Add your if/else statement here!
if (hungry&&foodHere===true){
return "true";
}

  else{
   return "false";   
      }

};eat();

the message Oops, try again.
It looks like your function doesn't return false when hungry is false.


#4

Remove the " " around true and false in your return statements


#5

thank you ,it's working


#6

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