25. Private Methods (Which parenthesis should I not have?)


#1




Can someone please tell me what the red underlined sentence means? What parenthesis are they talking about?


#2

function inside objects are called methods, agree? normally, when you call a function you do:

functioName();

if the function has arguments you supply the arguments between the parentheses. But in this case, you don't call the returnBalance method (as explained in the exercise), so no need to have parentheses (()). You did it right, wrong would have been:

return returnBalance();

#3

Well returnBalance is a function. Generally when you call a function you do;

returnBalance(parameter)

So it's refering to line 13 not having () after returnBalance


#4

10/10 straight forward explanation, thank you ^^ .