ArrayIsDefined()

edit

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

ArrayIsDefined( 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 to see if an index is defined at a given position

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

dump(arrayIsDefined(fruitArray,3)); //true
//member function dump(fruitArray.isDefined(30)); //false

See also