I have no idea what I am doing wrong


SyntaxError: unexpected token:

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

// On line 11, call the greeting function!
var greeting = function(Anthonie) {
    console.log("Great to see you," + " " + "Anthonie"):


Just write greeting("Antonie"); calls the greeting function with "Anthonie" paramater as name.



Delete the :

console.log("Great to see you," + " " + "Anthonie"):
Your error says - SyntaxError: unexpected token:


Calling the function means writing the name of the function and passing it an argument. The argument is what goes in the parameter field when you want to use the function. Let's say you made a function called eatStuff:

var eatStuff= function(stuff){
console.log("i like to eat " + stuff);

You would call it by writing:



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