en.javascript.info/1-js/9-object-inheritance/10-class-inheritance/1-clock-class-extended/solution.view/extended-clock.js
Ilya Kantor 63f55dc65d ok
2016-11-19 00:13:08 +03:00

12 lines
266 B
JavaScript

class ExtendedClock extends Clock {
constructor(options) {
super(options);
let { precision=1000 } = options;
this._precision = precision;
}
start() {
this._render();
this._timer = setInterval(() => this._render(), this._precision);
}
};