len () pergi

var array [4]int
slice := []int{0, 1, 2, 3}
fmt.Println(len(array)) //Outputs 4 as lenght of array
fmt.Println(len(slice)) //Outputs 4 as lenght of slice
//len() is only used with array or slices
Armandres