title: Returning a missing element from a string of integers
body: <p>I'm trying to write a function that accepts an array of unique integers between 0 and 9 (inclusive), and returns the missing element. Here's what I've got. So near but so far.</p>
  
  <pre><code>var currentPlace = 0;
  
  function getMissingElement(superImportantArray){
      while (currentPlace &lt; 9){
          for (var i = 0; i &lt; 10; i++) {
              var arrayNum = superImportantArray[currentPlace]
              if (i == arrayNum) {
                  currentPlace ++;
                  console.log("so it's not " + i);
              }
              else if (i !=arrayNum) {
                  console.log("try..." + i);
              }
          }
      }
  }
  // run
  var myArray = [0,5,1,3,2,9,7,6,4]; // this test should return 8
  getMissingElement(myArray);
  </code></pre>
  
  <p>I'm not sure i'm approaching this correctly. Thanks for your time.</p>