function indexOf(array, value) {
    var len = array.length;
    var i;

    for (i = 0; i < len; ++i) {
        if (array[i] === value) {
            return i;
        }
    }

    return -1;
}
Returns the first index at which a given value can be found in an array.

@private
@param {Array} array Array to search.
@param {*} value Value to locate in the array.
@returns {Number} Zero-based index at which the item is found, or -1.