• Returns the reversed representation of the given string

    Parameters

    • Optionaltext: null | string

      the source string to inspect

    • OptionalstartInclusive: number

      the starting index, inclusive

    • OptionalendExclusive: number

      the ending index, exclusive

    Returns string | undefined | null

    the reversed representation of the given string

    reverse('foobar');    // 'raboof'
    reverse('foobar', 1, 5); // 'aboo'