Loop through an array
<HTML> <HEAD> <SCRIPT language="JavaScript"> var parts= new Array() parts[0]="monitor"; parts[1]="motherboard"; parts[2]="chip"; parts[3]="hard drive"; </SCRIPT> </HEAD> <BODY> <SCRIPT language="JavaScript"> for (count=0;count<parts.length;count+=1) { document.write(parts[count]+"<BR>"); } </SCRIPT> </BODY> </HTML>