What is wrong with the following code:


#1

var sayGoodToSeeYou = function (name) {
console.log('Good to see you,' + " " + name);
};
sayGoodToSeeYou("Meggie");

I got: Good to see you, Meggie, but still got Oops message: Oops, try again. You did not call the greeting function. Pass it a name!


#2

It's expecting an exact name for you function. Change your function name to the "greeting" name it's telling you it's expecting and that should fix it for you :smiley:


#3

thanks, I will try; Meggie


#4

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


#5

Well go ahead and type out your new code and we'll see if no new errors formed while you were fixing your code (That happens to me so often :cry: )


#6

I think there must be a bug in this lesson. I got correct printout, es expected, but system does not let go any further.
Thanks though for your help.


#7


#8

Ah see that's what I mean. Take out the whole "sayHowAreYou" function and change:

sayHowAreYou("Meggie");

to

greeting("Meggie");

and you should be good to go!

It's expecting an exact use of variables (punctuation, grammar, etc.) must be perfect and as the lesson describes so the computer knows you understand. That's how the computer tracks if you're doing it right!


#9

I did just that, and still no go. Oy!


#10

Alright give me a minute to do some research and compare your code to mine. One more time could you post your code so I can see if anything has gone wrong?


#11

I did exactly as in instruction, an still to no avail. Thank you for your help. Perhaps we will figure out something. I have actually learnt a lot during this unfortunate experience.


#12

Ok so the "Instructions" say to do the following:

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

basically just take out everything from line 11 on. and replace it with:

greeting("Emily"');

#13

Thank you ever so much - it works!
var sayThankYou = function (name)
{
console.log("Thank you," + " " + name);
};
sayThankYou("lolman");