Advertisement
TrinkerMedia

Check for value change

May 2nd, 2014
538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var oldVal = Number;
  2. var newVal = updateLog;
  3.  
  4.      if (oldVal == "0"){
  5.         //do_nothing
  6.      }
  7.         else if (oldVal > newVal){
  8.             console.log("Adding Value")
  9.         }
  10.         else if (oldVal < newVal){
  11.         console.log("Substracting Value")
  12.         }
  13.  
  14. var oldVal = newVal;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement