function findIndex(predicate, context) {
  if (this == null) {
    throw new TypeError(
      'Array.prototype.findIndex called on null or undefined'
    );
  }
  if (typeof predicate !== 'function') {
    throw new TypeError('predicate must be a function');
  }
  const list = Object(this);
  const length = list.length >>> 0;
  for (let i = 0; i < length; i++) {
    if (predicate.call(context, list[i], i, list)) {
      return i;
    }
  }
  return -1;
}
function findIndex(predicate, context) {
  if (this == null) {
    throw new TypeError(
      'Array.prototype.findIndex called on null or undefined'
    );
  }
  if (typeof predicate !== 'function') {
    throw new TypeError('predicate must be a function');
  }
  const list = Object(this);
  const length = list.length >>> 0;
  for (let i = 0; i < length; i++) {
    if (predicate.call(context, list[i], i, list)) {
      return i;
    }
  }
  return -1;
}
function findIndex ( predicate , context ) { if ( this == null ) { throw new TypeError ( 'Array.prototype.findIndex called on null or undefined' ) ; } if ( typeof predicate !== 'function' ) { throw new TypeError ( 'predicate must be a function' ) ; } const list = Object ( this ) ; const length = list . length >>> 0 ; for ( let i = 0 ; i < length ; i ++ ) { if ( predicate . call ( context , list [ i ] , i , list ) ) { return i ; } } return - 1 ; }
/* eslint-disable no-bitwise, no-extend-native, radix, no-self-compare https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex
/ * eslint - disable no - bitwise no - extend - native radix no - self - compare https : // developer . mozilla . org / en - US / docs / Web / JavaScript / Reference / Global_Objects / Array / findIndex