5. Tying it all together help


SyntaxError: Unexpected end of input

var greeting = function (name) { 
        console.log("Bonjour" + " " +name);
    greeting("Jonathan") ;

Not too sure what I'm doing wrong.


Try removing "white-spaces".

Hope this helps! :smile:


Sadly I still don't know what you mean. I have gotten rid of some of the "white-spaces" if I know what you're trying to refer to.

var greeting = function(name){
console.log("Bonjour" + " "+name);


Are you doing this on a code bit, because java script for web development is a bit different than the regular java script language that codecademy teaches.


Have you tried a refresh Browser

++++ reset of session *****************
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser


Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).


Hi, @jonnyboythan.

Your issue is that you're ending in a weird place!

 var greeting = function (name) { 
        console.log("Bonjour" + " " +name);
    greeting("Jonathan") ;

you have an unneeded ";" on the third line. Remove that, and voila... it'll work!


var greeting = function (name) {
console.log("great to see you," + " " + "william");
}; greeting("name"); hope this helps