Documentation
    Preparing search index...

    Function findLastIndex

    • Find last index for which pred returns true

      This is a replacement for ECMAScript's Array built-in findLastIndex() which is unavailable in QJSEngine as of now. Using -1 instead of undefined in case of no match so the function matches the standard built-in's API.

      Type Parameters

      • T

      Parameters

      • arr: readonly T[]
      • pred: (t: T) => boolean

      Returns number

      Index of the last matching item or -1 in case no element matches