Phaser API Documentation

  Version: 

Member of: Phaser.Utils.Array

<static> SortByDigits(array)

Description:

Takes the given array and runs a numeric sort on it, ignoring any non-digits that may be in the entries.

You should only run this on arrays containing strings.

Parameters:

name type description
array Array.<string>

The input array of strings.

Returns:
Description:

The sorted input array.

Type:
  • Array.<string>
Since: 3.50.0