ReverseString
Reverses a string
- Use
make()
to create an appropriaterune
slice. - Use
range
andlen()
to iterate over the string's runes and add them in reverse to the result. - Use
string()
to convert therune
slice 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
.