I am trying to make a talent calculator by clicking "skill", will decrease this variable and right-clicking will increase this variable.
The problem is that I want the variable to be limited to more than 50 or below 0.
Now ive googled and searching here for variable constraints and maximum integers, but nothing gives me an idea of how to do this, I think that the incorrect wording of my searches is incorrect.
Can someone give me an idea how to do this or point me in the right direction, please, thanks.
Im variable using:
var a=50; function decrease(){a--;document.getElementById('boldstuff').innerHTML= +a;} function increase(){a++;document.getElementById('boldstuff').innerHTML= +a;}
source share