Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyGorange over channelsSingle-choice MCQ

Does ranging over a channel give you the index like ranging over a slice?

ch := make(chan string, 2) ch <- "a" ch <- "b" close(ch) for x := range ch { fmt.Print(x) }