String, numeric, and Boolean values are discrete values (scalar), and if a variable is discrete, then it has only one value at any time.
If you want to use a variable to store a set of values, you need to use an array.
An array is a collection of tree values with the same name , and each array in the collection is an element of an array, and you can use the variable team to store the names of each member of the team.
In JavaScript, arrays are created using the keyword array declaration, and colleagues can also declare the length of a variable. For example
var New Array (12); // declaring the length of a variable
when the final number of an array is unpredictable, declaring an array can specify no specific number . For example:
var ateam = new Array ();//array final number is unknown, you can not declare the exact number
Ateam[0] = 1414;
ATEAM[1] = "Beijing";
ATEAM[2] = 0x4;
ATEAM[3] = "I can";
ATEAM[4] = "red";
ATEAM[5] = "Blue";
ATEAM[6] = "orange";
Alternatively, you can create an array directly
var New Array ("111", "Blue", "Red", "Beijing");
As with strings, arrays can also use length to get and specify the length of an array.
var New Array ("111", "Blue", "Red", "Beijing" ); document.write (ateam[1]+ "<br>"); + "<br>")
Note: The array can be understood more deeply.
var New Array ("111", "Blue", "Red", "Beijing" ); ateam[] = "12415" document.write (ateam[20]+ "<br>"); + "<br>")
Not finished
JavaScript Basic Series (four) data type (array of arrays)