function reverseString(string) {
//convert the string to an array
const array = string.split('');
//use the reduce method to convert the array to a reversed string
const reversedString = array.reduce((reversed, character) => {
return character + reversed
}, '')
return reversedString
}