Quiz: Control Structures

Test your understanding of control structures in Go.

1

What is the output of the following code?

package main

import "fmt"

func main() {
	for v := range []string{"one", "two", "three"} {
		fmt.Println(v)
	}
}
A)

one

two

three

B)

1

2

3

C)

0

1

2

D)

0

2

3

Question 1 of 60 attempted

Get hands-on with 1200+ tech skills courses.