3.5.Tying it all together


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;

// Badly written function with syntax errors!

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


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!


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