title: Function to write all even numbers from form
body: <p>I have html form of 16 fields. User enters number in each field
   and function have to sort only even numbers and show them.</p>
  
  <blockquote>
    <p>// JS function for even numbers and printing out in paragraph //</p>
  </blockquote>
  
  <pre><code>function evenNumbers() {
    var numbers = document.getElementsByClassName("formInput");
    var i;
    for (i = 0; i &lt;= numbers.length - 1; i++) {
      if (numbers[i].value % 2 == 0) {
        document.getElementById("even").innerHTML = "Even numbers are: " + numbers[i].value;
        else {
          continue;
        }
      }
    }
  </code></pre>
  
  <p>After I fill in form, I do get text and value, but only last one.</p>
  
  <p>Question: How can I get function to write me all even numbers in one
  line?</p>
  
  <blockquote>
    <p>Example: 2,4,6,8 etc...</p>
  </blockquote>
  
  <p>What must I type in or change this function. Thank you all in advance</p>