title: Find out if value is greater or smaller than previous value Javascript
body: <p>As the title says I am struggling with how to find out if a value is greater or smaller than previous value javascript.</p>
  
  <p>Lets say I am sending a variable to a method with increments or decrements.</p>
  
  <p>Ex1: </p>
  
  <pre><code>value(3);
  </code></pre>
  
  <p>Ex2: </p>
  
  <pre><code>value(2);
  </code></pre>
  
  <p>Ex3:</p>
  
  <pre><code>value(4);
  </code></pre>
  
  <p>And the method...</p>
  
  <pre><code>function value(id){
  
  
  }
  </code></pre>
  
  <p>So when I get the values from the "sender" i want to determine if the value is greater or smaller than the other value in my method. First value is 3. The second value is 2 -- That would lead to that the first value is greater than the new input value 2 and so on...</p>
  
  <p>Any ideas? </p>
  
  <p>Thanks!</p>