Почему ResetableCounter is not defined?
function Counter(init){
this.init = init;
this.counter = init;
}
Counter.prototype.inc = function(){
this.counter++
}
ResetableCounter.prototype = Object.create(Counter.prototype)
ResetableCounter.prototype.reset = function(){
this.counter = this.init
}
let c = new ResetableCounter(100)
c.inc()
c.inc()