Junior — Senior
What will be displayed in the console after running program №37
livecode
Task condition
Determine what text will be printed to the console after executing the following code.
type Person struct {
Name string
}
func (person Person) SetName(newName string) {
person.Name = newName
}
func main() {
person := Person {
Name: "Bob"
}
fmt.Println(person.Name)
person.SetName("Alice")
fmt.Println(person.Name)
}