Constructors

From rbachwiki
Revision as of 19:13, 25 October 2016 by Bacchas (talk | contribs)
Jump to navigation Jump to search

Constructor

function Balance(current, deposit){
  this.current = current;
  this.deposit = deposit;
  this.display=function(){
    current +=deposit;
    console.log(current);
  }
}
var balance = new Balance(100,24);
balance.display();

Back To Top- Home - Category