code: function indexOfAll(arr, val) {
          return arr.reduce(function (acc, el, i) {
              return el === val ? [].concat(toConsumableArray(acc), [i]) : acc;
          }, []);
      }
docs: Returns all indices of val in an array. If val never occurs, returns [].
  
  @param  {Array}   arr   The array.
  @param  {Mix}     val   Value to find.
  @returns {Array}        Array with indexes.
  @example
  const arr = ['foo', 'bar', 'baz', 'foz', 'foo'];
  const arr2 = [1, 2, 4, 7, 2, 8, 6, 2, 6, 8];
  
  indexOfAll(arr, 'foo') // [0, 4]
  indexOfAll(arr, 'bar') // [1]
  indexOfAll(arr2, 2) // [1, 4, 7]