How to create a javascript table and get a calculations from input as table data
<p>I'm creating a table using Javascript. I have 2 input; a principle amount and an annual interest rate. How can I create a loop with an output into a table of 10 years with principle+compounded interest rate. I'm not allowed to use jquery.</p>

<p>**I'm trying to display results as a table of the increased amount based on the principle and interest (compound interest); Year 1 Year 2 Year 3 Year 4 Year 5 1100 1210 1331 1464 1610 (10 years in a table, first row are years 1 to 10, second row are the amounts, sorry I don't know how to add a picture here) </p>

<p>Here is what I have started so far for the form input;</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;

  &lt;head&gt;
    &lt;title&gt;Savings Account Calculator&lt;/title&gt;   

  &lt;/head&gt;

  &lt;body&gt;
    &lt;h1&gt;Savings Account Calculator&lt;/h1&gt;

  &lt;p&gt;

    &lt;form name="savingdata"&gt;
    &lt;table&gt;

    &lt;tr&gt;
    &lt;td&gt;Principle Amount:&lt;/td&gt; 
    &lt;td&gt;&lt;input type="text" id="principle" value="1000" /&gt;&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
    &lt;td&gt;Annual Interest (%):&lt;/td&gt; 
    &lt;td&gt;&lt;input type="text" id="interest" value="10" /&gt;&lt;/td&gt;
    &lt;/tr&gt;

    &lt;/table&gt;
    &lt;br&gt;
    &lt;input type="button" onClick="calculateBy()" Value="Calculate" /&gt;
    &lt;/form&gt;
    &lt;br&gt;
  &lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>