Index

Returns the index of the first occurrence of a value in the slice, or -1 if it does not exist.


slices.Index([]int{10, 20, 30}, 20)
                        
introduction.go