Calling a function


// Write your foodDemand function below.
// Last hint: In your reusable block of code, end each line
// with a semicolon (:wink:
var foodDemand = function(chicken) {
console.log("I want to eat" + " " + food );

It keeps saying that it looks like I didn't print anything to the console, but I have console.log right there! Please help! Also, what the heck does "calling" a function mean?


Also, what the heck does "calling" a function mean?



So why is it complaining about not calling the function if there are 2 function calls in your function?

Well because they are in your function! And the function only runs if there is a triggering signal from outside of it. Also be careful with calling your function inside itself unless you know what you're doing because this might end up in something similar to an infinite loop.