forEach.js 151 B

1234567
  1. 'use strict';
  2. module.exports = function forEach(array, callback) {
  3. for (var i = 0; i < array.length; i += 1) {
  4. callback(array[i], i, array);
  5. }
  6. };