src/javascript/core/utils/Basic.js
function inArray(needle, array) {
		if (array) {
			if (Array.prototype.indexOf) {
				return Array.prototype.indexOf.call(array, needle);
			}

			for (var i = 0, length = array.length; i < length; i++) {
				if (array[i] === needle) {
					return i;
				}
			}
		}
		return -1;
	}
function inArray(needle, array) {
		if (array) {
			if (Array.prototype.indexOf) {
				return Array.prototype.indexOf.call(array, needle);
			}

			for (var i = 0, length = array.length; i < length; i++) {
				if (array[i] === needle) {
					return i;
				}
			}
		}
		return -1;
	}
function inArray ( needle , array ) { if ( array ) { if ( Array . prototype . indexOf ) { return Array . prototype . indexOf . call ( array , needle ) ; } for ( var i = 0 , length = array . length ; i < length ; i ++ ) { if ( array [ i ] === needle ) { return i ; } } } return - 1 ; }
Find an element in array and return it's index if present, otherwise return -1.

@method inArray
@static
@param {Mixed} needle Element to find
@param {Array} array
@return {Int} Index of the element, or -1 if not found
Find an element in array and return it s index if present otherwise return - 1 .