5. Tying it all together help


#1



SyntaxError: Unexpected end of input


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

Not too sure what I'm doing wrong.


#2

Try removing "white-spaces".

Hope this helps! :smile:


#3

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);
};
greeting("Jonathan");


#4

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.


#5

@jonnyboythan
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

and

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

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


#6

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!


#7

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