Lesson 5


what is wrong with the code???

// Nicely written function:
var calculate = function (number) {
    var val = number * 10;

// Badly written function with syntax errors!

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


you need to make your badly written code:

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

good, so you need to fix all the bugs in it. And believe me, there are quit a few bugs in the badly written code


greeting var func((name)(console.log(name)));



no, take a look at the nice function, the var keyword should come first, then the function parameter (with brackets (()), then the function, which use curly brackets ({})

and the var greeting is (=) a function (function, not func), there are so many syntax problems in this code


i cant understand:

var greeting = function(name)



var greeting = function(name)
console.log("mt name is" + " " +name);

tnx stetim94