1.5 Tying it all together


#1

Okay. I've tried and tried and have NO IDEA what to do with this.
// Nicely written function:
var calculate = function (number) {
var val = number * 10;
console.log(val);
};

// Badly written function with syntax errors!

greeting var func{name}(console.log(name)))}
this is what i've tried:
var greeting function("number");{
console.log(val);
};
getting a syntax error, then unexpected identifier. Help me out. what is it supposed to look like?
PS. I've read the posts on this, but just can't figure it out. Thanks.


#3

You need to fix this function. The lesson is getting you to learnt the syntax.

You should make it this

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

You just needed to copy the layout of the first one but change number to name for the function and console.log

This should work unless they specified what input they wanted in the second function.


#4

i did not fix tihs code1

Help plase.

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


#5

after that put

greeting("paul");

otherwise can you tell me what the error its giving you is?