title: Why use a "do while" loop?
body: <p>I've never understood why using a <em>do while</em> loops is necessary. I understand what they do, Which is to execute the code that the while loop contains without checking if the condition is true first.</p>
  
  <p>But isn't the below code:</p>
  
  <pre><code>do{
      document.write("ok");
  }
  while(x == "10");
  </code></pre>
  
  <p>The exact same as:</p>
  
  <pre><code>document.write("ok");
  while(x == "10"){
      document.write("ok");
  }
  </code></pre>
  
  <p>Maybe I'm being very stupid and missing something obvious out but I don't see the benefit of using <em>do while</em> over my above example.</p>