allalgorithms-js

Reverse

Simply string reverse method, that’s all :)

Install

npm install allalgorithms

Usage

const allalgorithms = require('allalgorithms');

const str = 'orange';

console.log(allalgorithms.strings.reverse(str));
// -> egnaro

API

reverse(str)

Returns reversed string

Params: