title: JavaScript: Number Sequence with a For Loop
body: <p>JS:
      function myarray (){</p>
  
  <pre><code>}
    var starting=document.getElementById("starting");
    var ending=document.getElementById("ending");
    var step=document.getElementById("step");
    var results=document.getElementById("myarray")
  
    if (i&gt;=0){
      var result=starting
    }
  
  for (var starting&gt;=0; myarray&lt;=ending; i+=step)
    document.writeln(myarray[i+=step]){
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code> &lt;div id="results"&gt;Here are the even numbers between "startingnumber" and "endingnumber" by "step"&amp;nnsp's
  
  
      &lt;!DOCTYPE html&gt;
      &lt;html&gt;
       &lt;head&gt;
        &lt;title&gt;A Web Page&lt;/title&gt;
       &lt;/head&gt;
  
       &lt;script src="Guild_Practice.js"&gt;&lt;/script&gt;
  
       &lt;style media="screen"&gt;
      table {
        width:40%;
      }
  
      .titles {
        text-align: right;
        color: green;
        font-family: arial;
        font-weight: bold;
        padding-bottom: 10px;
      }
      caption {
        font-size: 32px;
        font-weight: bold;
        font-family: cursive;
        color: red;
      }
      .displayevens {
        text-align: center;
        padding-top: 10px;
      }
  
  
  
  
  
  
  
  
  
  
      }
  
       &lt;/style&gt;
  
       &lt;body&gt;
        &lt;table&gt;
          &lt;caption&gt;Sample&lt;/caption&gt;
        &lt;form&gt;
          &lt;tr&gt;
            &lt;!--Starting Number Line with Form --&gt;
            &lt;td class="titles"&gt;Starting Number&lt;/td&gt;
            &lt;td class="align-left"&gt;&lt;input type="text" id="starting"&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
            &lt;!-- Ending Number Line with Form --&gt;
            &lt;td class="titles"&gt;Ending Number&lt;/td&gt;
            &lt;td class="align-left"&gt;&lt;input type="text" id="ending"&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
            &lt;!-- Step Line with Form --&gt;
            &lt;td class="titles"&gt;Step&lt;/td&gt;
            &lt;td class="align-left"&gt;&lt;input type="text" id="step"&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
            &lt;!-- Button covered in both columns --&gt;
            &lt;td class="displayevens" colspan="2"&gt;&lt;button type="button"&gt;Display Evens&lt;/button&gt;&lt;/td&gt;
          &lt;/tr&gt;
        &lt;/form&gt;
      &lt;/table&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>I have to allow a user to enter a starting number an ending number and a step value into three textboxes on a page (which I have created). A button will be present that when clicked should output all the even numbers between the start and end value.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>How does my js code look so far?</li>
  <li>How do I make a phrase such as: "Here are the even numbers between 4 and 20 by 3's" and then list out the numbers. It will appear once I click the button.</li>
  </ol>