How does a function work?


#1



4 Introduction to Functions- How does a function work?


Oops, try again. It looks like you didn't put quotes around the food you gave foodDemand!


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

I refreshed but still getting OOPS message. Any ideas what is wrong?

Continuing the discussion from 4 Introduction to Functions- How does a function work?:


#2

@que0,
I tried your code in a windows 8.1 IE11 environment and got a pass....
Maybe....
++++ reset of session *****************
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

Addendum
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


#5

I am also getting this error. I had the quotations from the start, but tried the suggestions of refreshing browser & resetting code. Still getting error. I pretty sure my code is correct. I just moved on to the next lesson.