Can you give me an example of a greeting function


can some one help me


When we read, "a greeting function" it means we are to write a function and give it the name, greeting.

Function basics:

// function body code

as in,

var foo = function (bar) {
    console.log("foo" + bar);

And when we wish to call (invoke) the function, we write,


The output will be,


Now you try with greeting and inside the function use the exact text given in the instructions. Remember to call your function, afterward.


can you shorten that down by giving an example of a greeting function


it says that I need to give it a name


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