Phaser API Documentation

  Version: 

Member of: Phaser.Utils.Array

<static> Remove(array, item, [callback], [context])

Description:

Removes the given item, or array of items, from the array.

The array is modified in-place.

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

Parameters:

name type arguments description
array array

The array to be modified.

item * | Array.<*>

The item, or array of items, to be removed from the array.

callback function <optional>

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

context object <optional>

The context in which the callback is invoked.

Returns:
Description:

The item, or array of items, that were successfully removed from the array.

Type:
  • *
  • Array.<*>
Since: 3.4.0
Source: src/utils/array/Remove.js (Line 9)