code: function () {
              var carousel = this, n = carousel.get("numItems");
  
              while (n > 0) {
                  if (!carousel.removeItem(0)) {
                      YAHOO.log("Item could not be removed - missing?",
                                "warn", WidgetName);
                  }
                  /*
                      For dynamic loading, the numItems may be much larger than
                      the actual number of items in the table. So, set the
                      numItems to zero, and break out of the loop if the table
                      is already empty.
                   */
                  if (carousel._itemsTable.numItems === 0) {
                      carousel.set("numItems", 0);
                      break;
                  }
                  n--;
              }
  
              carousel.fireEvent(allItemsRemovedEvent);
          }
docs: Clears the items from Carousel.
  
  @method clearItems
  @public