Use do while when you want that a code block repeat n times, but the block itself is executed before the first conditional check.
<html>
<body>
<script>
number = 0
do
{
number++
}
while (number < 10)
alert(number)
</script>
</body>
</html>
The difference of having a do before the while, is that it will execute the code first, THEN evaluate the conditional to check if it must continue looping through the code block.