Hello everyone ! I am new to Go and have been following tutorials and blog posts to learn it . I am trying to print a 2d array of slices and have run into the following problem
func PrintGrid(grid [][]int ) {
for x := range grid {
the compiler prints out the following error message
./gameoflife.go:27: cannot range over x (type int)
can you tell me where I went wrong and the right way to loop over such 2d slices ? Thanks