1.5 Tying it all together


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;

// Badly written function with syntax errors!

greeting var func{name}(console.log(name)))}
this is what i’ve tried:
var greeting function(“number”);{
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.


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

You should make it this

var greeting = function(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.


i did not fix tihs code1

Help plase.

var greeting = function(name) {


after that put


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