title: Javascript compare two arrays and get values that do not match
body: <p>I really appreciate all your help on this. </p>
  
  <p>I have two arrays:</p>
  
  <ul>
  <li>the first array contains file names <strong>without an extension</strong></li>
  <li>the second array contains file names that <strong>have an extension</strong>. </li>
  </ul>
  
  <p>I need to output a third array, in this case <code>FinalArray</code> that contains a list of all the <code>ArrayFileNameWExt</code> that are not in the <code>ArrayFileName</code> array. </p>
  
  <p>I know I had a thread on finding matched items, which was great. But I'm having problems finding the unmatched items. I changed the == comparison to !== and that gave me one file name a hundred times. </p>
  
  <p>Thank you for your help on this, Maxine</p>
  
  <pre><code>var ArrayFileName = ['one', 'two', 'three', 'three', 'five', 'six', 'ten'];
  var ArrayFileNameWExt = ['one.txt', 'two.txt', 'three.txt', 'ten.wmf', 'eleven.cgm'];
  var FinalArray = [];
  
  for (var i = 0; i &lt; ArrayFileName.length; i++) {
      for (var j = 0; j &lt; ArrayFileNameWExt.length; j++) {
          var temp = ArrayFileNameWExt[j].split(".");
          if(ArrayFileName[i]!==temp[0]){
              FinalArray.push(ArrayFileNameWExt[j]);
              break;
          }
      }
  }
  </code></pre>