topical media & game development

talk show tell print

basic-javascript-02-ch2-examp8.htm / htm



  <html>
  <body>
  
  <script language="JavaScript" type="text/javascript">
  
  var myArray = new Array();
  myArray[0] = "Bob";
  myArray[1] = "Pete";
  myArray[2] = "Paul";
  
  document.write("myArray[0] = " + myArray[0] + "<BR>");
  document.write("myArray[2] = " + myArray[2] + "<BR>");
  document.write("myArray[1] = " + myArray[1] + "<BR>");
  
  myArray[1] = "Mike"; 
  document.write("myArray[1] changed to " + myArray[1]);
  
  </script>
  
  </body>
  </html>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.