lib/Ext/Container.js
function(newItems) {
        var me = this,
            i, ln, item, newActiveItem;

        if (Ext.isArray(newItems)) {
            for (i = 0, ln = newItems.length; i < ln; i++) {
                item = me.factoryItem(newItems[i]);
                this.doAdd(item);
                if (!newActiveItem && !this.getActiveItem() && this.innerItems.length > 0 && item.isInnerItem()) {
                    newActiveItem = item;
                }
            }
        } else {
            item = me.factoryItem(newItems);
            this.doAdd(item);
            if (!newActiveItem && !this.getActiveItem() && this.innerItems.length > 0 && item.isInnerItem()) {
                newActiveItem = item;
            }
        }

        if (newActiveItem) {
            this.setActiveItem(newActiveItem);
        }

        return item;
    }
function(newItems) {
        var me = this,
            i, ln, item, newActiveItem;

        if (Ext.isArray(newItems)) {
            for (i = 0, ln = newItems.length; i < ln; i++) {
                item = me.factoryItem(newItems[i]);
                this.doAdd(item);
                if (!newActiveItem && !this.getActiveItem() && this.innerItems.length > 0 && item.isInnerItem()) {
                    newActiveItem = item;
                }
            }
        } else {
            item = me.factoryItem(newItems);
            this.doAdd(item);
            if (!newActiveItem && !this.getActiveItem() && this.innerItems.length > 0 && item.isInnerItem()) {
                newActiveItem = item;
            }
        }

        if (newActiveItem) {
            this.setActiveItem(newActiveItem);
        }

        return item;
    }
Adds one or more Components to this Container. Example:

var myPanel = Ext.create('Ext.Panel', {
html: 'This will be added to a Container'
});

myContainer.add([myPanel]);

@param {Object/Object[]/Ext.Component/Ext.Component[]} newItems The new items to add to the Container.
@return {Ext.Component} The last item added to the Container from the `newItems` array.