Jump to Real's How-to Main page

Use a multidimensional array

// create 5x5 two dimensional array
var multidimension = new Array(5);
for ( var i=0; i < multidimension.length; i++ )
  multidimension[i] = new Array(5);

// access first element
multidimension[0][0] = "hello world"

If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]