3.5.Tying it all together


#1


JS 3.5.Tying it all together


I'm not sure how to correct line 8. Help?


// 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)))}


#2

Okay I will describe how to create functions in javaScript...

to define a function we have two ways...

// shorthand method...
 function  x() {
   //your code
}

and second...

var x = function() {
  //your code!
}

In this example you have to fix the typos!


#3

Thanks, it worked.
I find functions very hard, this helped. ;D


#4