demos/node-cli-item-management/index.js
function() {
        // remove the next item from the array
        const item = items.pop();

        // we are done if there is no item
        if (!item) {
          return Promise.resolve({ done: true });
        }

        // prompt to delete this item.
        return deleteItem(item, session);
      }
function() {
        // remove the next item from the array
        const item = items.pop();

        // we are done if there is no item
        if (!item) {
          return Promise.resolve({ done: true });
        }

        // prompt to delete this item.
        return deleteItem(item, session);
      }
every time we ask for a new item