11. AND, trouble with answer


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>
well I am having trouble with this, not because it didn’t give me an answer, but because it’s answer was
[Function], not true or false, here is my code:

```

var hungry = true
var foodHere = true

var eat = function() {
if(hungry && foodHere) {
return true
}
else {
return false
}
};
console.log(eat);

<do not remove the three backticks above>
Thanks!

#2

HI yous should just call the function eat like that

eat();

instaed of console.log(eat);


#3

Agree, but the function should take two arguments as well


#4

I am not sure if it’s because I need semicolon, or not, maybe after the return false, or true, or at top after variables


#5

It says I shouldn’t put in any parameters, but it worked with the calling it wrong thing, Thank you both for helping:)


#6

no it only work with the two variable hungry and foodHere