phaser - v4.0.0-rc.4
    Preparing search index...
    • Returns the first element in the array.

      You can optionally specify a matching criteria using the property and value arguments.

      For example: getAll('visible', true) would return the first element that had its visible property set.

      Optionally you can specify a start and end index. For example if the array had 100 elements, and you set startIndex to 0 and endIndex to 50, it would search only the first 50 elements.

      You can also specify a negative startIndex, such as -1, which would start the search at the end of the array

      Parameters

      • array: any[]

        The array to search.

      • Optionalproperty: string

        The property to test on each array element.

      • Optionalvalue: any

        The value to test the property against. Must pass a strict (===) comparison check.

      • OptionalstartIndex: number

        An optional start index to search from. You can also set startIndex to -1 to start the search from the end of the array. Default 0.

      • OptionalendIndex: number

        An optional end index to search up to (but not included) Default array.length.

      Returns object