Intro to function 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(name) {
console.log("Great to see you," + " " + name);
};

I don't understand what is wrong. It says I need to call the greeting function. Can someone help please


#2

a function only executes when calledl a function call exist out of: function name + parentheses and between the the parentheses the arguments. so for example if we want to greet robot:

greeting("Robot");

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.