code: function getArrayFromIterator(iterator) {
    let array = [],
        iteration;
  
    while ((iteration = iterator.next()) && !iteration.done) {
      array.push(iteration.value);
    }
  
    return array;
  }
docs: @function getArrayFromIterator
  
  @description
  convert an Iterator into an array based on its values
  
  @param {Iterator} iterator the iterator to call
  @returns {Array<*>} the array of values from the iterator