Array definition and iteration
<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> <H2>Computer Parts Needed:</H2> <SCRIPT language="JavaScript"> <!-- for (count=0;count<parts.length;count+=1) { document.write(parts[count]+"<BR>"); } //--> </SCRIPT> </BODY> </HTML>