Can be done using the traditional for statement or with the more idiomatic for…range statement. (for…range)
myStudentscores := [5]int{90,89,50,30,40]}
for _, score := range myStudentscores {
fmt.Println("Score:", score)
}
Programming Language Notes, Tip and Tutorials
Can be done using the traditional for statement or with the more idiomatic for…range statement. (for…range)
myStudentscores := [5]int{90,89,50,30,40]}
for _, score := range myStudentscores {
fmt.Println("Score:", score)
}