Billie Joe has been trying to learn about Go structs but he's having a really hard time! Can you help him fix his code so that he can properly print every individual field of the greenDay struct of the Band type?
Structs
Printing individual struct fields
Report a typo
Write a program in Go
package main
import "fmt"
// do not change the name or the contents of the 'Band' struct!
type Band struct {
Name string
Members []string
Genre string
}
func main() {
// do not change the contents or the name of the 'greenDay' struct!
greenDay := Band{
Name: "Green Day",
Members: []string{"Billie Joe Armstrong", "Mike Dirnt", "Tré Cool"},
Genre: "Punk rock",
}
// print each one of the individual fields of the 'greenDay' struct here
fmt.Println(?.?)
fmt.Println(?.?)
fmt.Println(?.?)
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.