26 passing arguments dont know what to do


it says Make sure to set myBalance equal to calling john's askTeller method with 1234 as the argument

Replace this line with your code. 
function Person(first,last,age) {
   this.firstname = first;
   this.lastname = last;
   this.age = age;
   var bankBalance = 7500;
   this.askTeller = function(pass) {
     if (pass == 1234) return bankBalance;
     else return "Wrong password.";

var john = new Person('John','Smith',30);
/* the variable myBalance should access askTeller()
   with a password as an argument  */
var myBalance = askTeller(1234);


you cant access method like that.
it should be



thanks so much for yor help


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.