function arrayFindReverse(array, fn) {
  let l = array.length;

  let ret = void 0;
  while (l) {
    l--;
    if (fn(array[l])) {
      ret = array[l];
      break;
    }
  }
  return ret;
}
/**
 * Like {@link Array.prototype.find}, but in reverse order.
 *
 * @param {Array} array An array.
 * @param {Function} fn Function to use for the test. The function will receive the array element as parameter.
 * @return {*} The first element which satisfies the test in the array by seeking for the element in reverse order
 *             (i.e. the last element of the array for which the test is satisfied).
 *             If no element satisfies the test, "undefined" is returned.
 */
Like  Array.prototype.find, but in reverse order.
@param {Array} array An array.
@param {Function} fn Function to use for the test. The function will receive the array element as parameter.
@return {*} The first element which satisfies the test in the array by seeking for the element in reverse order
.
If no element satisfies the test, "undefined" is returned.
Like Array . prototype . find but in reverse order . @param { Array } array An array . @param { Function } fn Function to use for the test . The function will receive the array element as parameter . @return { * } The first element which satisfies the test in the array by seeking for the element in reverse order . If no element satisfies the test " undefined " is returned .
function arrayFindReverse(array, fn) {
  let l = array.length;
  let ret = void 0;
  while (l) {
    l--;
    if (fn(array[l])) {
      ret = array[l];
      break;
    }
  }
  return ret;
}
function arrayFindReverse ( array , fn ) { let l = array . length ; let ret = void 0 ; while ( l ) { l -- ; if ( fn ( array [ l ] ) ) { ret = array [ l ] ; break ; } } return ret ; }
Like {@link Array.prototype.find}, but in reverse order.
Like { @link Array . prototype . find } but in reverse order .