title: JavaScript question using for loops and functions
body: <p>Create a generic function that outputs one line of the countdown (ten, nine, eight, seven etc.) on the web page, followed by an alert, and receives the data to output as an input parameter. Use that function to output each line of the countdown, and an alert.</p>
  
  <p>I need to output the countdown to the browser window and an alert is only being used to signal when to output the next line.</p>
  
  <p>I need to use a loop. I also can't use an array.</p>
  
  <p>This is what I have so far.<br>
  But I can’t figure out how to define the function that has an input parameter that contains the line to output.  </p>
  
  <pre><code>for (var count=10; count &gt;= 1; count--) { 
      window.alert("Click Okay!"); 
      document.write(count+"&lt;br /&gt;") 
  }
  { 
      window.alert("Click Okay!") 
      document.write("Ignition Start&lt;br /&gt;") 
      window.alert("Click Okay!") 
      document.write("Liftoff&lt;br /&gt;") 
      window.alert("Click Okay!") 
      document.write("We Have Liftoff!&lt;br /&gt;") 
  } 
  </code></pre>