Can someone please help me with this


#1

// Declare your variables here!
var hungry="true";
var foodHere="true";

var eat = function() {
if(hungry
// Add your if/else statement here!

};

how to procede?


#2

Hi @abhi082391

I have a cool code for you :

var hungry = true;
var foodHere = true;

var eat = function(){
if(hungry && foodHere){
console.log("Let's go to eat !");
}else{
console.log("Let's go to... sleep");    
};
};

eat();

You should revise basics of Javascript (like types of variables, conditions, operators,etc...).

Hold on :wink: