title: Sum all numbers between two integers
body: <p><strong>OBJECTIVE</strong></p>
  
  <p>Given two numbers in an array, sum all the numbers including (and between) both integers (e.g [4,2] -> 2 + 3 + 4 = <strong>9</strong>).</p>
  
  <p>I've managed to solve the question but was wondering if there is a more elegant solution (especially using Math.max and Math.min) - see below for more questions...</p>
  
  <p><strong>MY SOLUTION</strong></p>
  
  <pre><code>//arrange array for lowest to highest number
  function order(min,max) {
    return min - max;
  }
  
  
  function sumAll(arr) {
    var list = arr.sort(order);
    var a = list[0]; //smallest number
    var b = list[1]; //largest number
    var c = 0;
  
    while (a &lt;= b) {
      c = c + a; //add c to itself
      a += 1; // increment a by one each time
    }
  
    return c;
  }
  
  sumAll([10, 5]);
  </code></pre>
  
  <p><strong>MY QUESTION(S)</strong></p>
  
  <ol>
  <li>Is there a more efficient way to do this? </li>
  <li>How would I use Math.max() and Math.min() for an array?</li>
  </ol>