And?


#1

I don't know what I'm doing wrong? Please help!

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


#2

Hi Mally,

What error are you getting?


#3
// Declare your variables here!
var hungry = true;
var foodHere = true;
var eat = function() {
// Add your if/else statement here!
if(hungry && foodHere){
    return true;
 }
else{
    return false; 
 };

@senssessss In an effort to be a helpful community, next time don't just post code - make sure you explain how this helps the original poster. It's counter productive to just post code and have people copy/paste just to past an exercise, we aren't here to get points, we're here to learn. Hope that makes sense, thank you :blush: