# Arrays (scripting commands)

- [+](../../commands/~2B.md): Add two Numbers, concatenate two Arrays or two Strings, or create a copy of an Array or HashMap.
- [-](../../commands/-.md): Subtracts numbers or arrays from each another, negates a number. For arrays also see deleteAt and deleteRange.
- [append](../../commands/append.md): Appends array2 to the back of array1 modifying array1. See insert for an "appendUnique" equivalent.
- [apply](../../commands/apply.md): Applies the given code to each element of the given data structure and collects the results in an array.
- [arrayIntersect](../../commands/arrayIntersect.md): Intersects two arrays returning an array of unique common elements, avoiding nil values. Using the same array as both parameters will return unique elements of that array.
- [count](../../commands/count.md): Can be used to count: - The number of elements in an array (returns the already internally known array size) - The number of elements in an array matching the condition - The number of sub-entries in a config entry -…
- [createHashMapFromArray](../../commands/createHashMapFromArray.md): Creates a new HashMap and initializes it from a key-value pair array
- [deleteAt](../../commands/deleteAt.md): Removes array element at the given index and returns removed element (modifies the original array, just like resize or set).
- [deleteRange](../../commands/deleteRange.md): Removes a range of array elements from the given array. Modifies the original array, just like resize or set.
- [find](../../commands/find.md): Searches for an array element within an array or an ANSI string within an ANSI string.
- [findAny](../../commands/findAny.md): Returns the zero-based index of the first element in array A that also exists in array B. If no common elements exist it returns -1.
- [findIf](../../commands/findIf.md): Searches for an element within array for which the code evaluates to true. Returns the zero-based index on success or -1 if not found.
- [flatten](../../commands/flatten.md): Flattens an array.
- [forEach](../../commands/forEach.md): Executes the given command(s) on every item of an Array or a HashMap.
- [forEachReversed](../../commands/forEachReversed.md): Executes the given command(s) on every item of an Array in reversed order, compared to forEach.
- [in](../../commands/in.md): Checks whether value is in array, unit is in vehicle, position is inside location or ANSI string is part of other ANSI string. If Unicode support is desired, see forceUnicode.
- [insert](../../commands/insert.md): Inserts multiple values into Array/String/HashMap.
- [isArray](../../commands/isArray.md): Check if config entry represents array.
- [isEqualTypeAll](../../commands/isEqualTypeAll.md): Compares types of all elements of an array to the type of a single value. Since Arma 3 v2.09.149634 no additional check is needed to make sure the first argument is an Array.
- [isEqualTypeArray](../../commands/isEqualTypeArray.md): Compares types of all elements of one array to types of all elements of another array. Since Arma 3 v2.09.149634 no additional check is needed to make sure the first argument is an Array.
- [param](../../commands/param.md): Extracts a single value with given index from input argument, similar to BIS_fnc_param.
- [params](../../commands/params.md): Parses input argument into array of private variables. When used without argument, as shown in main syntax, internal variable _this, which is usually available inside functions and event handlers, is used as argument.
- [parseSimpleArray](../../commands/parseSimpleArray.md): Converts given, formatted as simple array, String into a valid Array. Simple array is array consisting of Numbers, Strings, Booleans and Arrays of all of the above.
- [pushBack](../../commands/pushBack.md): Insert an element to the back of the given array. This command modifies the original array. (see also: pushBackUnique)
- [pushBackUnique](../../commands/pushBackUnique.md): Adds element to the back of the given array but only if it is unique to the array. The index of the added element is returned upon success, otherwise -1. This command modifies the original array.
- [resize](../../commands/resize.md): Changes the size of the given array. The command does not return new array, it resizes the source array to the desired number of elements.
- [reverse](../../commands/reverse.md): Reverses given array by reference (modifies the original array, just like resize). The alternative syntax can be used to reverse a ANSI string. If Unicode support is desired, see forceUnicode.
- [select](../../commands/select.md): Selects an element from an array, config entry from Config or substring from a string or a range from an array.
- [selectMax](../../commands/selectMax.md): Returns the array element with maximum numerical value. Engine solution to BIS_fnc_greatestNum and BIS_fnc_findExtreme. Therefore it is expected that supplied array consists of Numbers only.
- [selectMin](../../commands/selectMin.md): Returns the array element with minimum numerical value. Engine solution to BIS_fnc_lowestNum and BIS_fnc_findExtreme. Therefore it is expected that supplied array consists of Numbers only.
- [selectRandom](../../commands/selectRandom.md): Returns a random element from the given array. Engine solution to BIS_fnc_selectRandom
- [selectRandomWeighted](../../commands/selectRandomWeighted.md): Returns a random element from the given array according to assigned weights. Engine solution to BIS_fnc_selectRandomWeighted.
- [set](../../commands/set.md): Changes the element at the given zero-based index of the array.
- [sort](../../commands/sort.md): Attempts to sort given array either in ascending (true) or descending (false) order.
- [toArray](../../commands/toArray.md): Converts the supplied String into an Array of Numbers. The numbers in the created array are the decimal Unicode representations of characters.
- [toString](../../commands/toString.md): Converts the supplied Array of Numbers into a String through <https://en.wikipedia.org/wiki/Unicode> characters representation conversion, or provided Code to compilable String.
