Menu
Coddy logo textTech

Longest String

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

challenge icon

Challenge

Easy

We have an array like this: ["abc", "coddy", "golang", "java"]. Write a function that print the longest string in the array along with the number of characters in that string. For example, in this array, the expected output should be golang 6.
 

Try it yourself

import "fmt"
func longestString() {

}

All lessons in Golang Challenges - Level 1