lib/chic-event.js
function arrayIndexOf (array, val) {

        // Use native indexOf
        if (Array.prototype.indexOf) {
            return array.indexOf(val);
        }

        // Use loop/if for environments without native indexOf
        var i, len = array.length;
        for (i = 0; i < len; len += 1) {
            if (array[i] === val) {
                return i;
            }
        }
        return -1;

    }
function arrayIndexOf (array, val) {

        // Use native indexOf
        if (Array.prototype.indexOf) {
            return array.indexOf(val);
        }

        // Use loop/if for environments without native indexOf
        var i, len = array.length;
        for (i = 0; i < len; len += 1) {
            if (array[i] === val) {
                return i;
            }
        }
        return -1;

    }
function arrayIndexOf ( array , val ) { // Use native indexOf if ( Array . prototype . indexOf ) { return array . indexOf ( val ) ; } // Use loop/if for environments without native indexOf var i , len = array . length ; for ( i = 0 ; i < len ; len += 1 ) { if ( array [ i ] === val ) { return i ; } } return - 1 ; }
Utilities Get the index of the first instance of a value in an array
Utilities Get the index of the first instance of a value in an array