2023-06-19 22:33:46 +00:00
|
|
|
const reverseString = function (string) {
|
|
|
|
let reversed = ''
|
2021-08-07 06:54:14 +00:00
|
|
|
|
2023-06-19 22:33:46 +00:00
|
|
|
Array.from(string).reverse().forEach(char => {
|
|
|
|
reversed += char
|
|
|
|
})
|
|
|
|
|
|
|
|
return reversed
|
2021-08-07 06:52:11 +00:00
|
|
|
};
|
|
|
|
|
2021-09-11 22:18:19 +00:00
|
|
|
// Do not edit below this line
|
2021-08-07 06:52:11 +00:00
|
|
|
module.exports = reverseString;
|