static/ext/src/lang/Array.js
function(array, fn, scope) {
            var i = 0,
                len = array.length;

            for (; i < len; i++) {
                if (fn.call(scope || array, array[i], i)) {
                    return array[i];
                }
            }
            return null;
        }
function(array, fn, scope) {
            var i = 0,
                len = array.length;

            for (; i < len; i++) {
                if (fn.call(scope || array, array[i], i)) {
                    return array[i];
                }
            }
            return null;
        }
Returns the first item in the array which elicits a true return value from the
passed selection function.
@param {Array} array The array to search
@param {Function} fn The selection function to execute for each item.
@param {Mixed} fn.item The array item.
@param {String} fn.index The index of the array item.
@param {Object} scope (optional) The scope (<code>this</code> reference) in which the
function is executed. Defaults to the array
@return {Object} The first item in the array which returned true from the selection
function, or null if none was found.