25. Private methods


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(){


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

It constanly returns with the title, my balance is not a funciton and undefined.


var myBalanceMethod = 
var myBalance = myBalanceMethod();

I don't understand the purpose of all of this, I believe you're simply overthinking it.


I'm not sure what myBalanceMethod is either, that doesn't make much sense to me because myBalanceMethod() was never defined.


this.askTeller = function() {

I hope this answers your questions but if you have any more let me know and I'll explain it further! :+1:


Thank you that worked, No those were originally left there in the skeletal code. And it confused me

From what i understand what i was doing wrong was not declaring where askTeller was from


Alright, I do apologize as I didn't reference the lesson, I went solely off what I saw. My mistake!


Haha no, Its fine You helped me either way.