And in control flow


#1

my code wont work and i need help
code:
var hungry=true;
var foodHere=true;

var eat = function() {
if(hungry&&foodHere){

  return true;}

};
eat()


#2

You should add your "else" statement after the "if" statement. Address what happens if it's not true (if hungry and foodHere are not equal to each other). :slightly_smiling:


#3

Also another } is needed to close the function.


#4

oki thx
appreciate your help