Tying it all together


This is my code for it you have to debug on line 9 I debugged it from
greeting var func{name}(console.log(name)))}
to this
greeting var function (name) {


Variable declaration always begins with var:

var greeting

We then proceed to define the variable with an assignment:

var greeting = function () {};

Next we insert the formal parameter:

var greeting = function (name) {};

Now we can write the code into the function body:

var greeting = function (name) {

Now compare this to the given and study the brackets. See the differences?


Ok I did this

var greeting = function (name) {

This was the error I got

Oops, try again. Your code doesn't look quite right. Feel free to peek back at earlier exercises if you need a syntax refresher!

I looked back and noting :frowning:


While this looks like a function call expression, it calls upon an undefined function, name(). That is the variable in the parameter that takes the argument, 'Felix'. Use the function name in the call:



Oh I get it know thx <3


And how are you a codeacademy Moderator