title: How can I rewrite this program with a while loop instead of a for loop in Javascript?
body: <p>Write a loop to print the powers of 3 under 10,000 (it should
  print 3, 9, 27, etc.).
  Rewrite this loop with a while loop. (Hint: Provide the
  setup before the loop.)</p>
  
  <p>For loop I created: </p>
  
  <pre><code>for (var x = 3; x &lt; 10000; x = x * 3) {
    alert(x);
  }
  </code></pre>
  
  <p>I am stuck, I know I need to set the conditions before the loop, but I'm getting nowhere</p>