title: Merging two object (NodeList) arrays in JavaScript
body: <p>I am attempting to merge two arrays of objects to so I can validate a form. The usual concat method does not appear to work in this circumstance. Concat works with ordinary numerical and string arrays but doesn't with object arrays. The line <code>var allTags = allInputs.concat(allSelects);</code> does not work.</p>
  
  <pre><code>var allInputs = document.getElementsByTagName("input");
  alert("Inputs: " + allInputs.length);
  
  var allSelects = document.getElementsByTagName("select");
  alert("Selects: " + allSelects.length);
  
  var allTags = allInputs.concat(allSelects);
  alert("allTags: " + allTags.length);
  </code></pre>