function Checking(amount){
if(amount){
this.banlance=amount;
}else{
this.banlance=0;
};
this.deposit=function(dep){
this.banlance+=dep;
};
this.withdraw=function(dra){
if(dra>this.banlance){
console.log("Insufficient funds.");
}else if(dra<=this.banlance){
this.banlance-=dra;
}
}
this.toString=function(){
if(this.banlance){
console.log('Your Account Banlance is:'+this.banlance)
}else{
console.log('No funds left!');
}
}
}
var newAccout=new Checking(10000);
newAccout.toString();
newAccout.deposit(8000);
newAccout.toString();
newAccout.withdraw(80000);
newAccout.toString();
console.log(newAccout);