function arrayEach(array, iteratee) {
  var index = 0;
  var iterable = array;

  if (!Array.isArray(array)) {
    iterable = Array.from(array);
  }

  var length = iterable.length;

  while (index < length) {
    if (iteratee(iterable[index], index, iterable) === false) {
      break;
    }

    index += 1;
  }

  return array;
}
A specialized version of `.forEach` for arrays without support for callback
shorthands and `this` binding.

{@link https://github.com/lodash/lodash/blob/master/lodash.js}

@param {Array|*} array The array to iterate over or an any element with implemented iterator protocol.
@param {Function} iteratee The function invoked per iteration.
@returns {Array} Returns `array`.