Return II

Why is it outputting the description of the function in the last line instead of the output? (see attached picture)

21 PM


LIne 25 does not invoke the getTotal function. It is currently logging the string representaition of the function object, but should be logging the return value.

To invoke a function, use () after the function name.

1 Like

Thanks for responding.

I believe I had that first, but this is what happens when I change that. The issue must be somewhere else?

The reference error is caused by the typo in line 17. Check the name of your function.

1 Like

Wow, I should spellcheck more carefully next time.

Thanks, mtf!

1 Like

Every line, as we go… Identify objects as we type them into the source code.

1 Like