function indexOf( arr, searchElement, fromIndex ) {
	var len;
	var i;
	if ( !isCollection( arr ) && !isString( arr ) ) {
		throw new TypeError( format( 'invalid argument. First argument must be an array-like object. Value: `%s`.', arr ) );
	}
	len = arr.length;
	if ( len === 0 ) {
		return -1;
	}
	if ( arguments.length === 3 ) {
		if ( !isInteger( fromIndex ) ) {
			throw new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', fromIndex ) );
		}
		if ( fromIndex >= 0 ) {
			if ( fromIndex >= len ) {
				return -1;
			}
			i = fromIndex;
		} else {
			i = len + fromIndex;
			if ( i < 0 ) {
				i = 0;
			}
		}
	} else {
		i = 0;
	}
	// Check for `NaN`...
	if ( isnan( searchElement ) ) {
		for ( ; i < len; i++ ) {
			if ( isnan( arr[i] ) ) {
				return i;
			}
		}
	} else {
		for ( ; i < len; i++ ) {
			if ( arr[ i ] === searchElement ) {
				return i;
			}
		}
	}
	return -1;
}
Returns the first index at which a given element can be found.

@param {ArrayLike} arr - array-like object
@param {*} searchElement - element to find
@param {integer} [fromIndex] - starting index (if negative, the start index is determined relative to last element)
@throws {TypeError} must provide an array-like object
@throws {TypeError} third argument must be an integer
@returns {integer} index or -1

@example
var arr = [ 4, 3, 2, 1 ];
var idx = indexOf( arr, 3 );
// returns 1

@example
var arr = [ 4, 3, 2, 1 ];
var idx = indexOf( arr, 5 );
// returns -1

@example
// Using a `fromIndex`:
var arr = [ 1, 2, 3, 4, 5, 2, 6 ];
var idx = indexOf( arr, 2, 3 );
// returns 5

@example
// `fromIndex` which exceeds `array` length:
var arr = [ 1, 2, 3, 4, 2, 5 ];
var idx = indexOf( arr, 2, 10 );
// returns -1

@example
// Negative `fromIndex`:
var arr = [ 1, 2, 3, 4, 5, 2, 6, 2 ];
var idx = indexOf( arr, 2, -4 );
// returns 5

idx = indexOf( arr, 2, -1 );
// returns 7

@example
// Negative `fromIndex` exceeding input `array` length:
var arr = [ 1, 2, 3, 4, 5, 2, 6 ];
var idx = indexOf( arr, 2, -10 );
// returns 1

@example
// Array-like objects:
var str = 'bebop';
var idx = indexOf( str, 'o' );
// returns 3