Use for loop to fill an array
<html> <head> <title>A Simple Page</title> <script language="JavaScript"> var myarray = new Array(); for (i = 0; i < 10; i++) { myarray[i] = i; } alert(myarray); </script> </head> <body> </body> </html>