title: Javascript countdown settimeout
body: <p>im trying to make a simple javascript countdown timer which changes the value from 3 to 1 in the button every one second interval. I got the code working but it uses many functions. I was wondering if i could make it using less. ive tried to put the countdown in a for loop which displays the i value but it doesn't seem to work properly.</p>
  
  <p>Heres my code:</p>
  
  <pre><code> function launch( )
  {
    document.getElementById("blast").value = "Preparing to launch...";
    setTimeout ( "countdown3()", 1000 );
  }
  function countdown3()
  {
      document.getElementById("blast").value = "3";
      setTimeout("countdown2()", 1000);
  }
  function countdown2()
  {
      document.getElementById("blast").value = "2";
      setTimeout("countdown1()", 1000);
  }
  
  function countdown1()
  {
  document.getElementById("blast").value = "1";
  setTimeout("GO()", 1000 );
  }
  function GO()
  {
      document.getElementById("blast").value = "BLAST OFF";
      move();
  }
  </code></pre>