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.78 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.77 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.76 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.75 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.74 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.73 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.72 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.71 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.70 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.69 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.68 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.67 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.66 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.65 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.64 tracks/javascript/exercises/accumulate/example.js
trackler-2.2.1.63 tracks/javascript/exercises/accumulate/example.js