I am a full time JSholic. This is not limited to coding but also to news. I'm interested in everythin gwhich has to do with javascript. Of course I am generally interested into the theoretical thing js bases on: Computer Science (the base class of my addiction).
Surprisingly, I am also interested in other thing, but I don't think that those a relevant for mentioning here on stackoverflow.
class Addiction {
addictionLevel = Number.MAX_VALUE;
constructor() {}
lower() {
this.addictionLevel--;
}
higher() {
this.addictionLevel = Number.MAX_VALUE;
}
}
const myAddiction = new MyAddiction();
const me = new AverageHuman(myAddiction);
const life = window.setInterval(() =>{
if(me.isDoingSomethingRelatedToProgramming)
myAddiction.lower();
else
myAddiction.higher();
}, 0);