title: For loop iterate over powers of 2
body: <p>I want to write a for loop that will iterate over the powers of 2 for each loop. </p>
  
  <p>For example I would want a range like this:</p>
  
  <pre><code>2, 4, 8, 16, ... , 1024
  </code></pre>
  
  <p>How could I do this?</p>