number Object - Arshiatmi/jsha GitHub Wiki
number Is A Simple Object To Control Level, Scores And ...
Way To Use :
let num = new number([first_value = 0]);
num.[function]()
Notice : The First Value Is Optional And Default Is 0
Functions And Methods :
increase( [ how_many = 1 ] )
This Method Will Increase The Number Is (how_many). how_many Is Optional And Default Is 1.
decrease( [ how_many = 1 ] )
This Method Will Decrease The Number Is (how_many). how_many Is Optional And Default Is 1.
Notice : You Can Access To The Number By Using object.number
An Example :
let level = new number(1);
while(True){
if(...){
level.increase();
}
}