Phaser API Documentation

  Version: 

Member of: Phaser.Utils.Array

<static> RemoveBetween(array, startIndex, endIndex, [callback], [context])

Description:

Removes the item within the given range in the array.

The array is modified in-place.

You can optionally specify a callback to be invoked for the item/s successfully removed from the array.

Parameters:

name type arguments description
array array

The array to be modified.

startIndex number

The start index to remove from.

endIndex number

The end index to remove to.

callback function <optional>

A callback to be invoked for the item removed from the array.

context object <optional>

The context in which the callback is invoked.

Returns:
Description:

An array of items that were removed.

Type:
  • Array.<*>
Since: 3.4.0