Sha256: 3e021909024382ffcf3a65c28b4f7be10cc3c809f86598b0f34398a4bf246b06

Contents?: true

Size: 216 Bytes

Versions: 116

Compression:

Stored size: 216 Bytes

Contents

module.exports = function (list, accumulator) {
  var out = [];
  var idx = -1;
  var end = Array.isArray(list) ? list.length : 0;

  while (++idx < end) {
    out.push(accumulator(list[idx]));
  }

  return out;
};

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.158 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.157 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.156 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.155 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.154 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.153 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.152 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.151 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.150 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.149 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.148 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.147 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.146 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.145 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.144 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.143 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.142 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.141 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.140 tracks/javascript/exercises/accumulate/example.js