ArrayDelete

Deletes specified object from given array

ArrayDelete( array, value [, scope ] )

Returns: Boolean

Argument Description
array
array, required

The array to delete from

value
object, required

The value to delete

scope
string, optional

one: replaces the first occurrence (default) all: replaces all occurrences

Examples

Deletes an array element by its value

arr = [12,0,1,2,3,4,5,6];
dump(arr);
arrayDelete(arr,4);
dump(arr);

Deletes an array element by its value (member function)

arr = [12,0,1,2,3,4,5,6];
dump(arr);
arr.delete(4);
dump(arr);

See also