title: (JavaScript) Why does a continue statement inside 'if' in a while loop crash the browser?
body: <p>I want to write a program in JavaScript to print all the numbers from 1 to 20 except 5 and 10. When I use a for loop like this: <br /></p>
  <pre><code>for (x = 1; x &lt;= 20; x++) {
      if (x == 5 || x == 10) {
          continue;
      }
      document.write(x + ' ');
  }
  </code></pre>
  <p>It works properly and prints <code>1 2 3 4 6 7 8 9 11 12 13 14 15 16 17 18 19 20</code>. <br /></p>
  <p>However, when I try to use a while loop like this: <br /></p>
  <pre><code>var x = 1;
  
  while (x &lt;= 20) {
      if (x == 5 || x == 10) {
          continue;
      }
      document.write(x + ' ');
      x++;
  }
  </code></pre>
  <p>It makes the webpage unresponsive and I get a prompt asking me to close it. What is the problem here?</p>