5. Tying it all together


// Badly written function with syntax errors!

greeting var func{name}(console.log(name)))} 

So I did ;

var greeting = function (name) {
    greeting = ("Sarah");

Oops, try again. You did not call the greeting function. Pass it a name! 

Please help :confused:


a function call should be after a function, given the function call will execute the function.

also, calling the function, there should be no equal sign. a single equal sign means assign, a function call is not assigning


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