4 - How does a Function Work? Help please!


#1


https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/0/4?curriculum_id=506324b3a7dffd00020bf661#


Oops, try again. You did not declare foodDemand!


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


#2

Demand is with uppercase first letter. (case sensitivity)


#5

thank you, i've been stuck on this lesson for hours!


#6

A post was split to a new topic: 4. how does a function work


#7

3 posts were split to a new topic: 4. how does a function work


#9

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