Receiving an error that I do not understand or can resolve


5. Tying it all together

Ops, try again. You did not call the greeting function. Pass it a name
The console.log displays "John"

// Nicely written function:
var calculate = function (number) {
    var val = number * 10;

// Badly written function with syntax errors!

  function greetings(name) {


You don't have a function by that name, greeting. What are the names of the function in the code you posted?


Looks like I called it greetings instead of greeting!!


Isn't this funny. The original code must have been 'greeting' but when I fixed the code I used 'greetings'.
I coded the function and the call with 'greetings' and the code executed properly but the code analysis code was looking only for 'greeting' so it failed the code checking process. I have always said that programmers do not need to be good with English or spelling as long as the misspell consistently!!
Thanks for your help. I appreciate your insite. (my spelling!!) John


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