Function getIndexOfLastNonZeroElement

  • Returns the index of the last non-zero element of an array. If there are only zero elements the function returns -1.

    Parameters

    • array: any[]

      An array of hexadecimal or big numbers.

    Returns number

    The index of the last non-zero element.