ReverseString
Reverses a string
- Use
make()to create an appropriateruneslice. - Use
rangeandlen()to iterate over the string's runes and add them in reverse to the result. - Use
string()to convert theruneslice to astring.
Reverses a string
make() to create an appropriate rune slice.range and len() to iterate over the string's runes and add them in reverse to the result.string() to convert the rune slice to a string.