11. And. I get false"


I get "FALSE", but I don't know why, please help.

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

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


I was wrong at this line:

var eat = function(hungry, foodHere) {

That's the way it works.

var eat = function() {


Hey, may I know why you used return and not console.log? because i got a problem because i wrote a console.log instead return..
also if i write console.log(return);
do you think it's possible beause it didnt worked for me as well ^


I think
is wrong, if you want to print what function returns, you have to write function with 'return', and then call it like this
console.log(eat(true, true));


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