core/Core.js
function findByName(array, name) {
        if (array && array.length > 0) {
            for (var i = 0, len = array.length; i < len; i++) {
                var elem = array[i];
                if (elem.name == name) {
                    return elem;
                }
            }
        }
        return null;
    }
function findByName(array, name) {
        if (array && array.length > 0) {
            for (var i = 0, len = array.length; i < len; i++) {
                var elem = array[i];
                if (elem.name == name) {
                    return elem;
                }
            }
        }
        return null;
    }
function findByName ( array , name ) { if ( array && array . length > 0 ) { for ( var i = 0 , len = array . length ; i < len ; i ++ ) { var elem = array [ i ] ; if ( elem . name == name ) { return elem ; } } } return null ; }
Find element by name in a given array.

@param {Array.<Element>} array
@param {string} name
@return {Element}
Find element by name in a given array .