• Just like array.forEach

    Example

    forEach('Hello', (char, index) => char == 'o' && consol.log(index)); // console logs 4
    

    Parameters

    • str: string
    • fn: ((char: string, index: number, chars: string[]) => void)
        • (char: string, index: number, chars: string[]): void
        • Parameters

          • char: string
          • index: number
          • chars: string[]

          Returns void

    Returns void

Generated using TypeDoc