<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2716.2200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><STRONG><FONT face="Century Gothic" size=2>I've written many modest 
scripts, but this one baffles me.&nbsp; It generates all the prime numbers under 
2000.&nbsp; Can anyone explain it to me?&nbsp;</FONT></STRONG></DIV>
<DIV><STRONG><FONT face="Century Gothic" size=2>Thx, Doug.</FONT></STRONG></DIV>
<DIV><STRONG><FONT face="Century Gothic" size=2></FONT></STRONG>&nbsp;</DIV>
<DIV><STRONG><FONT face="Century Gothic" size=2></FONT></STRONG>&nbsp;</DIV>
<DIV><STRONG><FONT face="Century Gothic" size=2>&lt;script&gt;<BR>&lt;!--<BR>for 
(i=2; i&lt;=100; i++) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
(i%100==0){document.write("&lt;BR&gt;")}; <BR>&nbsp;prime=true; <BR>&nbsp;for 
(j=2; j&lt;i; j++) { 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
(i%j==0){prime=false;break} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }; 
<BR>&nbsp;if (prime){document.write(i+" ")}; 
<BR>}<BR>//--&gt;<BR>&lt;/script&gt;<BR></FONT></STRONG></DIV></BODY></HTML>