.. _Array: ================================================ Array ================================================ Description ----------- An array with integer indexing and a?length?property. Properties ^^^^^^^^^^ +--------------------------------------+-------------------------+ | :ref:`length` readonly | The length of the array | +--------------------------------------+-------------------------+ Constructors ^^^^^^^^^^^^ +------------------------------------+----------------------------------+ | :ref:`Array` readonly | Creates and returns a new array. | +------------------------------------+----------------------------------+ Methods ^^^^^^^ +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`concat` readonly | Returns a new array created by concatenating the given values to the end of the original array. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`join` readonly | Joins all elements of the array into a string; optionally, each element is separated by delimiter. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`pop` readonly | Removes the last element from the array, decreases the length by 1, and returns the value of the element. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`push` readonly | Places one or more values onto the end of the array and increases length by n. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`reverse` readonly | Reverses the order of the elements in the array. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`shift` readonly | Removes the first element from the array, decreases the length by 1, and returns the value of the element. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`slice` readonly | Creates a new array, which contains a subset of the original array's elements. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`sort` readonly | Sorts the elements of the array in place, using the given function to compare to elements. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`splice` readonly | Removes num elements from the array beginning with index, start. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`toLocaleString` readonly | Converts an array to a string and returns the string (localized). | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`toSource` readonly | Creates a string representation of this object that can be fed back to?eval()?to re-create an object. Works only with built-in classes. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`toString` readonly | Converts an array to a string and returns the string. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`unshift` readonly | Adds one or more elements to the beginning of the array. | +------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ .. container:: hide .. toctree:: :hidden: :maxdepth: 1 Array/length.rst Array/concat.rst Array/join.rst Array/reverse.rst Array/slice.rst Array/sort.rst Array/pop.rst Array/push.rst Array/splice.rst Array/shift.rst Array/toString.rst Array/toLocaleString.rst Array/unshift.rst Array/toSource.rst Array/Array.rst