Skip to content

reverseString()

reverseString(input): string

Defined in: src/utils/stringUtils.ts:89

Reverses the characters in a string.

Parameters

input

string

The string to reverse.

Returns

string

The reversed string.

Example

tsx
reverseString('hello'); // 'olleh'
reverseString(''); // ''

Released under the MIT License.