Phaser API Documentation

  Version: 

Member of: Phaser.Utils.Array

<static> Each(array, callback, context, [args])

Description:

Passes each element in the array to the given callback.

Parameters:

name type arguments description
array array

The array to search.

callback function

A callback to be invoked for each item in the array.

context object

The context in which the callback is invoked.

args * <optional>

Additional arguments that will be passed to the callback, after the current array item.

Returns:
Description:

The input array.

Type:
  • array
Since: 3.4.0
Source: src/utils/array/Each.js (Line 7)