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