#

API Documentation for: NEXT
Show: Inherited Protected Private Deprecated

# Utility Methods Class

Defined in: `Utility Methods:36`
Module: CreateJS

- Index
- Methods

## Item Index

### Methods

- indexOf

## 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.