| 
		
			Сообщение от alex.vv
			
		
	 | 
	| 
		и где реализация?
	 | 
	
Все ждал, что кто нибудь проснется.
Ладно, вот простейшая реализация:
Account={
 balance: 0,
 create: function(){return Object.create(this)},
 withdraw: function(amount){if((this.balance-amount)<0) return console.log("out of limit!"); this.balance-=amount},
 deposit: function(amount){this.balance+=amount},
 check: function(){console.log(this.balance)}
}
////////example//////////////////
account=Account.create()
with(account){
 deposit(100)  
 check()       //>>>> 100
 withdraw(50)  
 check()       //>>>> 50
 withdraw(70)  //>>>> out of limit!
 check()       //>>>> 50
}