Menu
Coddy logo textTech

String Reversal & Duplication

Lesson 21 of 24 in Coddy's Golang Challenges - Level 1 course.

challenge icon

Challenge

Easy

We have a string like this: "abcdfgh".

Write a function that takes a string as input, reverses it, and doubles each character to create a new string.

For example, if the input string is "abcdfgh", the expected output should be "hhggffccbbddaa".

The function should reverse the input string and then duplicate each character in the reversed string to form the new string.

Try it yourself

func reverseAndDouble()  {

}

All lessons in Golang Challenges - Level 1