title: Remove duplicates from an array using javascript
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2218999/remove-duplicates-from-an-array-of-objects-in-javascript">Remove duplicates from an array of objects in javascript</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to remove any duplicates in an array. For example if I have <code>112233</code> I want to return only <code>123</code>.</p>
  
  <p>My code:</p>
  
  <pre><code>function array_unique(array) {
      var array_length = array.length;
      var new_array = [];
      for (var i = 0; i &lt; array_length; i++) {
          if (array[i] == array[i + 1]) {
  
          }
          new_array.push(array[i]);
      }
      return new_array;
  }
  </code></pre>
  
  <p>I don't know what to type in the if so I can remove the doubles</p>