function each(arr, fn, target) {
  let i;
  const len = (arr && arr.length) || 0;
  for (i = 0; i < len; i++) {
    fn.call(target, arr[i], i);
  }
}
Loop over each item in an array-like value.

@param {Array<*>} arr The array to loop over
@param {Function} fn The function to call
@param {?Object} target The object to bind to the function