5. Tying it all together


#1


// Badly written function with syntax errors!

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

So I did ;

var greeting = function (name) {
    greeting = ("Sarah");
    console.log(name);
};

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

Please help :confused:


#2

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


#3

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