Contact: aviboots(AT)netvision.net.il
38,589 questions
50,273 answers
573 users
package main import ( "fmt" "slices" ) func main() { arr := []int{1, 4, 8, 0, 15, 7, 100} if slices.Contains(arr, 8) { fmt.Println("exists") } else { fmt.Println("not exists") } } /* run: exists */