Funtion Syntax


Can somebody help?

You can run this code by "calling" the function, like this:


Calling this function will print out Hello Emily.

On line 11, call the greeting function and put in a name that you want the greeting function to include.
Press "Save & Submit Code" and see the function get into action! Saves you so much time.

var sayHello = function(Emily) {
    console.log('Hello' + Emily);

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

Oops, try again. You did not call the greeting function. Pass it a name!


Could you post the link to the exercise? Looks like you want to reinvent the wheel when the exercise just asks to use it. Also do you know how this parameter works?

PS: @peterlearns_coding probably more like

greeting("your Name");


You have to call your function. :slight_smile:

afte defining a function for example,

var my_function = function (param)  {    
console.log("My name is," + " " + param);
my_function("any string")

I called the function on the last line.


On line 11, you need to call your function and put in a name that you want, for example "John".
Like this:


And it will print Great to see you John


thanks a lot guys, though im very new to coding, sometimes i get stuck in really simple problems! if u have any suggestions for beginners to progress fast in coding would make me so happy!

Thanks :smile:


thank you very much! it really helps.

i would b also interested for books or tutorials that you know from experience that they really work :slight_smile:


Sorry don't know any


anyway was helpful! appreciate it


Python for Beginners

Python for kids.

Dive into Python.

Learn Python

These are all really helpful books you can find online. :slight_smile:


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