Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardGochannel internals hchan sudogSingle-choice MCQ

What does the code below print, and what hchan-level mechanism causes that output?

ch := make(chan int, 2) ch <- 1 ch <- 2 close(ch) fmt.Println(<-ch, <-ch, <-ch, <-ch)