Reverse a string
npm install --save string-rev
const sReverse = require('string-rev');
sReverse('123');
//=>'321'
sReverse('abcdef');
//=> 'fedcba'
sReverse('madam');
//=> 'madam'
sReverse(); // without parametr this function will throw a type error.
//=> TypeError: expects a string got undefined
Prosen Ghosh prosenghosh25@gmail.com
- MIT