Nodejs Utililty Methods Array Iterator

List of utility methods to do Array Iterator

Description

The list of methods to do Array Iterator are organized into topic(s).

Method

__iterator__(flag)
"use strict";
Array.prototype.__iterator__ = function (flag) {
  var len = this.length,
  item = 0;
  for (; item < len; i++) {
    yield flag ? item : this[item];
};
__iterator__(isKeys)
Array.prototype.__iterator__ = function(isKeys) {
  for( let i = 0, l = this.length; i<l; ++i )
    yield isKeys ? i : this[i];
};