ArrayIndexExists()

edit

Returns whether there exists an item in the array at the selected index.

ArrayIndexExists( array=array, index=number );

Returns: Boolean

Argument Description
array
array, required
edit

The array to search

index
number, required
edit

The index which to check

Examples

edit

Check if index exists in array

fruitArray = ['apple', 'kiwi', 'banana', 'orange', 'mango', 'kiwi'];

dump(arrayIndexExists(fruitArray,3));
// member function dump(fruitArray.indexExists(3));

See also