Skip to content

Function: reverseString()

ts
function reverseString(str): string;

Inverte uma string

Parameters

str

string

String a ser invertida

Returns

string

A string invertida

Example

ts
import { reverseString } from 'example-lib';
const result = reverseString('hello');
console.log(result); // olleh