title: Remove all of the duplicate numbers in an array of numbers
body: <p>I received this question for practice and the wording confused me, as I see 2 results that it might want.</p>
  
  <p>And either way, I'd like to see both solutions.</p>
  
  <p>For example, if I have an array:</p>
  
  <pre><code>let arr = [1, 2, 4, 2, 3, 3, 4, 5, 5, 5, 8, 8, 9, 10];
  </code></pre>
  
  <p>I'm taking this as wanting the final result as either:</p>
  
  <pre><code>let finalResult = [1, 2, 3, 4, 5, 8, 9, 10];
  </code></pre>
  
  <p>OR:</p>
  
  <pre><code>let finalResult = [1, 9, 10];
  </code></pre>
  
  <p>The difference between the two being, one just removes any duplicate numbers and leaves the rest and the second just wants any number that isn't a duplicate.</p>
  
  <p>Either way, I'd like to write two functions that does one of each.</p>
  
  <p>This, given by someone else gives my second solution.</p>
  
  <pre><code>let elems = {},
  
  arr2 = arr.filter(function (e) {
     if (elems[e] === undefined) {
         elems[e] = true;
      return true;
    }
    return false;
  });
  console.log(arr2);
  </code></pre>
  
  <p>I'm not sure about a function for the first one (remove all duplicates).</p>