Exploring Objects : class
JavaScript
class Timer{
constructor(){
this.token = 0;
}
start() {}
stop() {}
}
Object.freeze(Timer.prototype);
let timer= new Timer();
console.log(timer.__proto__ === Timer.prototype);
class Timer{
constructor(){
this.token = 0;
}
start() {}
stop() {}
}
Object.freeze(Timer.prototype);
let timer= new Timer();
console.log(timer.__proto__ === Timer.prototype);