phaser - v4.0.0-rc.4
    Preparing search index...

    Function RemoveRandomElement

    • Removes a random object from the given array and returns it. Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.

      Parameters

      • array: any[]

        The array to removed a random element from.

      • Optionalstart: number

        The array index to start the search from. Default 0.

      • Optionallength: number

        Optional restriction on the number of elements to randomly select from. Default array.length.

      Returns object