Can someone assist with lesson 3 (Intro to Functions in JS)


#1




// Below is the greeting function!
// See line 7
// We can join strings together using the plus sign (+)
// See the hint for more details about how this works.

var greeting = function (name) {
    console.log("Great to see you," + " " + name);
};

// On line 11, call the greeting function!
var greeting = function (Omar) {
    console.log("greeting" + "" + Omar);
};


#2

a function call is simple the name of the function + argument:

greeting("omar");

what you did here:

var greeting = function (Omar) {
    console.log("greeting" + "" + Omar);
};

is created a new function. A function call simple means you call the function, so it gets executed