title: How to loop through all the elements returned from getElementsByTagName
body: <p>I am trying to loop through all the elements retruned from <code>getElementsByTagName("input")</code> using forEach. Any ideas why this does not work in FF, Chrome or IE?</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;input type="text" value="" /&gt;
          &lt;input type="text" value="" /&gt;
          &lt;script&gt;
              function ShowResults(value, index, ar) {
                  alert(index);
              }
              var input = document.getElementsByTagName("input");
              alert(input.length);
              input.forEach(ShowResults);
      &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>