title: Is there a function like array_unique() in jQuery?
body: <p>I have a select where i can get some values as array like <code>["1","2","3"]</code></p>
  
  <p>On every change i run the following code to get a result of array which is connected to these values i get from select</p>
  
  <pre><code>$('#event-courses-type').on('change',function(){
  
      type = $('#event-courses-type').val();
  
      console.log(type);
  
      var var1 = ["4689 Leadership Award", "UKCC Level 1", "UKCC Level 2", "UKCC Level 3", "UKCC Level 4", "Old WHU Award", "None at present"];
      var var2 = ["4689 Leadership Award", "GB-wide Level 1", "Old Level 1 (Pre January 2012)", "Level 2", "Level 3", "EHF", "FIH", "None at present"];
  
      var var5 = ["D32/33", "A1 Assessor", "CTS", "IAPS", "PTLLS", "AVRA", "Umpire Educator Training", "Umpire Assessor Training"];
      var var6 = ["D32/33", "A1 Assessor", "CTS", "IAPS", "PTLLS", "AVRA", "Umpire Educator Training", "Umpire Assessor Training"];
  
      var results = [];
  
      if ($.inArray("1",type) != -1) {
          var results = $.merge(var1, results);
      }
      if ($.inArray("2",type) != -1) {
          var results = $.merge(var2, results);
      }
      if ($.inArray("5",type) != -1) {
          var results = $.merge(var5, results);
      }
      if ($.inArray("6",type) != -1) {
          var results = $.merge(var6, results);
      }
  
      console.log(results);
  )};
  </code></pre>
  
  <p>Here is my console log to let you see the type array after i selected 2 options and the results array:</p>
  
  <pre><code>["1", "2"] ------------------- add_event.php:802
  
  ["4689 Leadership Award", "GB-wide Level 1", "Old Level 1 (Pre January 2012)", "Level 2", "Level 3", "EHF", "FIH", "None at present", "4689 Leadership Award", "UKCC Level 1", "UKCC Level 2", "UKCC Level 3", "UKCC Level 4", "Old WHU Award", "None at present"]
  </code></pre>
  
  <p>As you see there is two times "4689 Leadership Award" and i dont want this to happen. In PHP i use the <code>array_unique()</code> function to eliminate these duplicated values but i dont know how to do it in jQuery.</p>