Step 5 : unbugging a code


#1



https://www.codecademy.com/fr/courses/javascript-beginner-fr-FR-rpcse/0/5?curriculum_id=5355c2b7516bcbd912000008


I cannot go beyond this step... error message says : SyntaxError: Unexpected token ';'. Expected an opening '{' at the start of a function body.

can someone help me ??

Kind Regards,


var nom = function (saluer); {
     
     var val = moi  ; 
     console.log(val);};


#2

Hi

could you remove the semi-colon ; between function (saluer) and the opening { ?

Cheers


#3

hi ... thanks for your advice ... but it still does not work...
do you have other ideas?
cheers


#4

HI your function should be like that

var functionName = function(argument) {#open the function

}#close the fuction

in the English version the name of the function is greeting which is the french for saluer so the name of your functionName should be saluer and the argument shoudl be nom so it should be like that

var saluer = function(name) {
    console.log(name)
}

#here you should call teh function saluer

then you should call the function saluer()

Hint

saluer("Here type your name");


#5

I think that's the perfect answer.
congz