Note one can easily define and use multidimensional arrays as in syntax
-
listofmenus[0].options[0]='Admin';
-
var currentworld = 0;
-
listofmenus[currentworld].options[1]='FoilWorld'; // etc.
|
Arrays (the new ones!) have some interesting methods
-
MyArray.sort(sortmethod) returns list sorted in fashion determined by optional argument sortmethod (a user function comparing two elements)
-
MyArray.join(separator) returns a string of the MyArray elements separated by the character string separator
-
MyArray.reverse() reverses order in Array
|
MyArray = new Array(Initialsize,value0,value1, ...); // can specify an initialsize and initial values at the user's pleasure. These arguments are opitional and undefined initial values are set to null
|