I don't seem to understand the while condition and would like to know if someone has a better explanation. I understand the while loop will only execute if the condition is true. So now I ask you how can this code "run" successfully if I enter the number 11? the while loop has a condition that checks if topNumber(11) < 1 or topNumber > 100. How can code/statements below the while loop execute if 11 is not less than 1 or greater than 100 which will make this a false condition. Maybe I'm going around circles but I hope someone else has a better explanation as the javascript runs perfectly fine.

<!DOCTYPE html>
<html lang="en">
	<meta charset="UTF-8">	
	<title>Sum the Numbers</title>
   	<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> 	
        alert("Sum the Numbers from 1 through entry");
        do {
        	var topNumber = prompt("Enter top number to sum", 5);
        	topNumber = parseInt(topNumber);
        	if (isNaN(topNumber) || topNumber < 1 || topNumber > 100) {
        		alert("Top number must be greater than zero and less than 100");
        while (isNaN(topNumber) || topNumber < 1 || topNumber > 100);
        var sum = 0;
        for (i = 1; i <= topNumber; i++) {
        	sum += i;
        alert("Sum of numbers from 1 through " + topNumber + " = " + sum);
        <h1>This page is displayed after the JavaScript is executed</h1>