Array

The Array class is a class that handles arrays.

You can create objects of this class and treat them like arrays using the subscripts specified by the indirect member selection operator.
Subscripts are integers.
0 represents the first element and 1 represents the next element.
If you specify a negative integer, it is treated as specified from the end of the array (-1 represents the last element).
The size of the array does not need to be declared.
The size is automatically expanded to the size of the specified subscript, and elements with no assigned value are initialized to void.

There is also a count property, which represents the size of the array.
You can also change the size of the array by assigning a value to the count property.

You can use [] to write an object of class Array in an expression on the fly.
In [], separate the expressions that are the initial elements, separated by commas.
For example
var ar = ["a", "b", "c"];
If you write, ar is assigned a reference to an object of the Array class that contains the elements "a", "b", and "c".
You can also use [] to generate an Array class.
var ar = [];
When
var ar = new Array();
Is the same.

Member

Method
add (Adds the specified value to the end of the array.)
assign (Copy the array.)
assignStruct (Copy the array along with the structure.)
clear (Delete all the elements of the array.)
erase (Deletes the specified subscript element.)
find (Returns the subscript where the specified value first appears.)
forEach (Executes the argument function for each element of the array.)
includes (Determines if it contains the specified value.)
insert (Inserts the specified value at the specified position.)
join (Combine the arrays into a single string.)
load (Read the array from a file.)
loadStruct (Enter structured data from a file)
pack (Returns the array element in octet according to the character string specified by the argument.)
pop (Takes one element from the end of the array and returns it.)
push (Adds the specified element to the end of the array.)
remove (Deletes the element that has the same value as the specified value.)
reverse (Upside down the order of the elements in the array.)
save (Write the array to a file.)
saveStruct (Outputs structured data to a file.)
shift (Takes one element from the beginning of the array and returns it.)
sort (Sort the array.)
split (Split the string.)
unshift (Add the element to the beginning of the array.)
Property
count (Represents the size of the array.)
length (Represents the size of the array. Same as count.)