Use for each loop to assign array element value : Array Index : Array JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Array » Array Index »

 

Use for each loop to assign array element value

















<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
var myarray = new Array("","","","","","","","","","");
for (x in myarray)
{
    myarray[x"img" + x + ".gif";
}
document.write(myarray);
//  -->
</script>
</head>
<body>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Array
» Array Index