API Documentation for: 0.7.1
Show:

Utility Methods Class

Defined in: Utility Methods:36
Module: CreateJS

Item Index

Methods

Methods

indexOf

(
  • array
  • searchElement
)
Number

Defined in indexOf:78

Finds the first occurrence of a specified value searchElement in the passed in array, and returns the index of that value. Returns -1 if value is not found.

 var i = createjs.indexOf(myArray, myElementToFind);

Parameters:

  • array Array

    Array to search for searchElement

  • searchElement Object

    Element to find in array.

Returns:

Number:

The first index of searchElement in array.