title: Comparing two arrays and getting the non duplicate(not unique) values
body: <p>I have two sets of arrays. I need to get the letters that are not in both arrays. First it should check if index 0 'a' is on both arrays. If it is in both than it should delete 'a' from both(just the first 'a' in  first array not the one at the end(index 3). And go the the second item 'b' using same logic. </p>
  
  <p>var arrayA = ['a','b','c','a'];</p>
  
  <p>var arrayB = ['a','d','f','c'];</p>
  
  <p>var arrayC = []; //Shoud have the result[b,a,d,f]</p>
  
  <p>The code is set up at <a href="http://jsfiddle.net/rexonms/AbFYh/#base" rel="nofollow">http://jsfiddle.net/rexonms/AbFYh/#base</a></p>
  
  <p>HTML</p>
  
  <pre><code> &lt;p class="arrayA"&gt;Array A&lt;/p&gt;
   &lt;p class="arrayB"&gt;Array B&lt;/p&gt;
   &lt;p class="arrayC"&gt;Array C&lt;/p&gt;
  </code></pre>
  
  <p>​
  jQuery</p>
  
  <pre><code>var arrayA = ['a','b','c','a'];
  var arrayB = ['a','d','f','c'];
  var arrayC = []; //Shoud have the result[b,a,d,f]
  
  $('.arrayA').text('ArrayA: ' + arrayA);
  $('.arrayB').text('ArrayB: ' + arrayB);
  
  $.each(arrayA, function(indexA,valueA) {
  $.each(arrayB, function(indexB, valueB){
  
      if(valueA != valueB)
      {
          arrayC.splice(valueA);            
      }
  });
  
  $('.arrayC').text('ArrayC: ' + arrayC);
  });
  </code></pre>