Junior — Senior
What output will the console display when running program №32
livecode
Task condition
Determine what text will be recorded in the log when the following program is executed:
func handle1(s1 []int){
s1[0] = 111
}
func handle2(s2 []int){
s2 = append(s2,12345)
}
func main() {
s1 := [] int{0, 1, 2}
log.Printf("before : %v", s1)
handle1(s1)
log.Printf("after handle1 : %v", s1)
handle2(s2)
log.Printf("after handle2 : %v", s2)
}