One can easily define and use multidimensional arrays:
-
MenuArray[0].options[0] = 'Admin';
-
MenuArray[0].options[1] = 'FoilWorld'; // etc.
|
Arrays (in NN 3.0) have some interesting methods:
-
myArray.sort(sortMethod)
-
returns an array sorted according to the optional sortMethod (a user-defined, boolean function comparing two elements)
-
myArray.join(separator)
-
returns a string of elements separated by the character separator
-
myArray.reverse()
-
reverses the order of the elements in the array
|
myArray = new Array(InitSize,val0,val1,...);
|
specifies an initial size and initial values of the array. The arguments are optional and undefined initial values are set to null.
|