Use for loop to initialize 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; } document.write(myarray); // --> </script> </head> <body>
</body> </html>
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
|