Why use parentheses here? I am a little bit confused


#1

function Person(first,last,age) {
this.firstname = first;
this.lastname = last;
this.age = age;
var bankBalance = 7500;

var returnBalance = function() {
return bankBalance;
};

// create the new function here
this.askTeller = function() {
return returnBalance;
}
};

var john = new Person('John','Smith',30);
console.log(john.returnBalance);
var myBalanceMethod = john.askTeller();

var myBalance = myBalanceMethod;
console.log(myBalance);

It returned an error when I tried to run the code this way and accepted it only when there are parentheses in front of myBalanceMethod. Why is this so since myBalanceMethod is just a variable holding a method?


#2
I made an html file and pasted the code into it and checked to console. When it says
var myBalance = myBalanceMethod;
console.log(myBalance);
what is outputs to the console is

function() {
return returnBalance;
}

But when you have the () added it outputs 7500. So it seems when you don't have the parentheses added it'll just output whatever is inside of john.askTeller(), while the parentheses tells it to actually run the function.