@bushbass/Simple forEach example
JavaScript

Part one of writing your own forEach http://alexnielsen.com/javascript/24/

const each = function(collection, iterator) {
  for (let i = 0; i < collection.length; i++) {
    iterator(collection[i], i, collection);
   }
  };
  

  
  // with ES6 function call
  each([1,2,3,4,5], item => console.log(item));
Native Browser JavaScript