Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. var a=50;
  2. function decrease(){a--;document.getElementById('boldstuff').innerHTML= +a;}
  3. function increase(){a++;document.getElementById('boldstuff').innerHTML= +a;}
  4.  
  5. if (a < 0)
  6. a = 0;
  7.  
  8. if (a > 50)
  9. a = 50;
  10.  
  11. var a=50;
  12. function decrease(){ a = Math.max( a-1,0) ; document.getElementById('boldstuff').innerHTML= a;}
  13. function increase(){ a = Math.min( a+1,50); document.getElementById('boldstuff').innerHTML= a;}
  14.  
  15. var a=50;
  16. function decrease(){
  17. if(a > 0){
  18. a--;
  19. document.getElementById('boldstuff').innerHTML= +a;
  20. }
  21. }
  22. function increase(){
  23. if(a < 50){
  24. a++;
  25. document.getElementById('boldstuff').innerHTML= +a;
  26. }
  27. }
  28.  
  29. var a=50;
  30. function decrease(){if(a>0){a--;document.getElementById('boldstuff').innerHTML= +a;}}
  31. function increase(){if(a<50){a++;document.getElementById('boldstuff').innerHTML= +a;}}
  32.  
  33. var a=50;
  34.  
  35. function decrease(){
  36. if (a > 0) {
  37. a--;
  38. document.getElementById('boldstuff').innerHTML = a;
  39. }
  40. }
  41.  
  42. function increase(){
  43. if (a < 50) {
  44. a++;
  45. document.getElementById('boldstuff').innerHTML = a;
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement