Array type
An array is a series of data stored in a variable that is accessed using index numbers that indicate particular data. The following fragments illustrate the storage of the data in separate variables or in one array variable:
var Test0 = "one";
var Test1 = "two";
var Test2 = "three";
var Test = new Array;
Test[0] = "one";
Test[1] = "two";
Test[2] = "three";
After either fragment is executed, the three strings are stored for later use. In the first fragment, three separate variables have the three separate strings. These variables must be used separately. In the second fragment, one variable holds all three strings. This array variable can be used as one unit, and the strings can be accessed individually. The similarities, in grouping, between Arrays and Objects is more than slight. In fact, Arrays and Objects are both objects in ScriptEase with different notations for accessing properties. For practical programming, Arrays may be considered as a data type of their own.
Arrays and their characteristics are discussed more fully in a later section.