Junior — Senior
What output will appear in the console (example 30)
livecode
Task condition
What will be the output when the following program is executed?
import (
"fmt"
)
type person struct {
age int
}
func main() {
list := [] person{
{age: 18},
{age: 25},
}
alex := &list[1]
alex.age++
list = append (list, person{age:30})
alex.age++
fmt.Println(list.[1].age)
fmt.Println(alex.age)
}