Array definition and iteration : Array : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » Array »

 

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>
           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» Array