Junior — Senior
What text will appear in the console when running program №1
livecode
Task condition
What will be displayed on the screen after executing the following Go code:
type Counter int
func (c Counter) Increment() {
c++
}
func main() {
var cnt Counter
cnt.Increment()
fmt.Print(cnt)
}
Note that the Increment method is declared with a value receiver, not a pointer.