<!DOCTYPE html>
<html>
<head>
  <title>Loop</title>
</head>
<body>
  <h2>Do While Loop</h2>
  
  <script>
    
    let count = 0;
     do {
         document.write("Iteration: " + count, `<br>`);
         count++;
     } while (count < 5);
    
  </script>
</body>
</html>
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.