code: function iteratorFor(items) {
      var iterator = {
        next: function next() {
          var value = items.shift();
          return { done: value === undefined, value: value };
        }
      };
  
      if (support.iterable) {
        iterator[Symbol.iterator] = function () {
          return iterator;
        };
      }
  
      return iterator;
    }
docs: Build a destructive iterator for the value list