Can someone plz write the correkt program?


It is better to post some code so we can help you to figure out what you did wrong .


// On line 11, call the greeting function!
var gretting = function("David");


Or this one??

var gretting = function ("David") {
console.log("Great to see you," + " " + "David");


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


is the correct code here is why:

the parameter (what is in the parentheses) is what you will be changing when you reuse the code later on (when you write long code) what is in the { } is what will be reused. When you call the function greeting and put ("David") after it that is saying make the parameter (what you will change in the code) David and where ever name is used like console.log("Great to see" + " " + name); it will replace name with what ever you put in the parentheses when you call the variable. If that doesn't make sense tell me and I will reword it. Good Luck!


Thanks alot #magiccookie :smile: