javascript-collections-framework
    Preparing search index...

    Function indexOfSubList

    • Returns the first index at which target occurs in source as a contiguous run, comparing elements with SameValueZero, or -1 when it does not occur. An empty target occurs at 0.

      Time: O(n·m) for sizes n and m.

      Parameters

      Returns number

      The first index of the run, or -1.

      TypeError when either argument is not a list from this library.

      indexOfSubList(asList([1, 2, 3, 2, 3]), asList([2, 3])) // 1