title: Create a web page with prompts
body: <p>My prompt boxes aren't working? Ever since I've put in the element stuff there not working. </p>
  
  <p>I need prompt boxes so I can enter info and then that info to automatically go into a table and then it to automatically read the largest amount of $ by having a * in the row of the table. I'm not 100% on js coding so don't laugh if its a simple fix (it's the simple things that get me). </p>
  
  <p>This is my code, I don't know what I've done wrong </p>
  
  <p>"my table is in the head" </p>
  
  <pre><code>function money(){
  
  this.currency = "";
  this.amount = "";
  this.exchangeRate = "";
  this.ausDollars = "";
  
  tbody = document.getElementsByTagName('tbody')[0];
  for (var i = 0; i &lt;= 3; i++) 
    trElement = document.createElement('tr');
    tbody.appendChild(trElement);
  
  // Read the 3 letter currency abbreviation entered
    currency = prompt('Please enter a 3-letter currency abbreviation', +i, "");
    // If the input data is invalid ask the user to re-enter it
    while (currency.length != 3) {
      currency = prompt('Currency abbreviation was not entered', "");
      currency = parseFloat(currency);
    }
  
  currencyTH = document.createElement('th');
    currencyText = document.createTextNode(currency);
    currencyTH.appendChild(currencyText);
    trElement.appendChild(currencyTH);
  
   // Read the amount and convert it to entered currency 
    amount = prompt('Please enter an amount of money in that currency', +i, "");
    // If the input data is invalid ask the user to re-enter it
    while (isNaN(amount) || amount &lt; 0) {
      amount = prompt('An amount of money was not entered')
      amount = parseFloat(amount);
    }
  
  amountTH = document.createElement('th');
    amountText = document.createTextNode(amount);
    amountTH.appendChild(amountText);
    trElement.appendChild(amountTH);
  
   exchangeRateTH = document.createElement('th');
    exchangeRateText = document.createTextNode(exchangeRate);
    exchangeRateTH.appendChild(exchangeRateText);
    trElement.appendChild(exchangeRateTH);
  
  }
  </code></pre>