I keep getting Oops try again false. Your bill is NAN. whats going on?


#1

//Add the voidLastTransaction Method here
voidLastTransaction:function(){
this.total-=this.lastTransactionAmount;

}

};

cashRegister.scan('eggs',1);
cashRegister.scan('milk',1);
cashRegister.scan('magazine',1);
cashRegister.scan('chocolate',4);

//Void the last transaction and then add 3 instead
cashRegister.voidLastTransaction();
cashRegister.scan('chocolate',3);

//Show the total bill
console.log('Your bill is '+cashRegister.total);


#2

can you put the entire code here


#3

Put up your entire code so that I can check if you have modified the 'add' property or maybe there is some problem with your syntax.


#4

Its alright I managed to figure out what wa going on