package main
import (
"fmt"
)
func main() {
arr := [5]string{"go", "java", "php", "python", "c++"}
fmt.Println(elementExists(arr, "go"))
fmt.Println(elementExists(arr, "c"))
fmt.Println(elementExists(arr, "php"))
}
func elementExists(arr [5]string, s string) bool {
for _, element := range arr {
if element == s {
return true
}
}
return false
}
/*
run:
true
false
true
*/