Page under construction!!

Shortest word

write a function shortestWord(words []string) int that, given a slice of strings, return the length of the shortest string bytewise.

If there are more than one such strings, it returns the last one.

To test the function you can use the main below:

func main() {
    const N = 10
    words := make([]string, N)

    for i := 0; i < N; i++ {
        fmt.Scan(&words[i])
    }

    fmt.Println(shortestWord(words))
}