Given an array and a string, it mutates the provided array and inserts the string after the closest match. It returns the index at which the string was inserted.

  • Parameters

    • arr: string[]

      An array of strings to mutate.

    • el: string

      The element to insert in provided array.

    Returns number

    The index of the insert.