Menu
Coddy logo textTech

String Character Printer

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

challenge icon

Challenge

Easy

We have a string like this: "Coddy".

Write a function that takes a string as input and returns each character of the string on a separate line.

For example, if our string is "Coddy", the expected output will be:

C
Co
Cod
Codd
Coddy
Codd
Cod
Co
C

Try it yourself

import "fmt"
func printCharacters() {

}

All lessons in Golang Challenges - Level 1