27/30 - Don't know how to print 'john.bankBalance'


#1
function Person(first,last,age) {
   this.firstname = first;
   this.lastname = last;
   this.age = age;
   var bankBalance = 7500;
  
   this.getBalance = function() {
      // your code should return the bankBalance
        return bankBalance;
   };
}

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

// create a new variable myBalance that calls getBalance()
var myBalance = john.getBalance();

#2

You will have to re-place
console.log(myBalance);
to the end of your code.


#3

before you log
console.log(myBalance);

you must also log
console.log(john.bankBalance);