4: Help


#1

var foodDemand = function (food){
console.log("I want to eat"+"Bannanas"+food);

foodDemand ("Grapes");
}

Any help??


#2

the function call:

foodDemand ("Grapes");

should be after the function:

var foodDemand = function (food){
    console.log("I want to eat"+"Bannanas"+food);
}
// function call here, it calls/execute the function

#3

so place the function call beneath the console.log statement?


#4

no, after the } which closes the function. See comment i made in the code sample i posted above?


#5

it works, thanks a lot but uim still puzzled to where I should place semi colons curly brackets, very frustrating


#6