Function endsWithOneOf

  • Returns true if str starts with one of the provided strings.

    Parameters

    • str: string
    • strings: string[]

    Returns boolean

    endsWithOneOf('cb', 'a', 'b'); // true
    endsWithOneOf('cc', 'a', 'b'); // false