Phaser API Documentation

  Version: 

Member of: Phaser.Utils.Array

<static> RemoveAt(array, index, [callback], [context])

Description:

Removes the item from the given position in the array.

The array is modified in-place.

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

Parameters:

name type arguments description
array array

The array to be modified.

index number

The array index to remove the item from. The index must be in bounds or it will throw an error.

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:

The item that was removed.

Type:
  • *
Since: 3.4.0