Token error


#1

var functionfoodDemand(food){
console.log("I want to eat" + " " + food):
}
foodDemand("pan fried chicken")
it says unexpected token


#2

this entire line is wrong

var functionfoodDemand(food){

it should be

var foodDemand = function(food){

Remember there are two ways to define functions in JavaScript. Either by this

var functionName = function(args){

                     //statements
};

or

function functionName(args){

       //statements

}