Skip to content

Instantly share code, notes, and snippets.

@arled
Created February 10, 2015 19:29
Show Gist options
  • Save arled/cb01c1e2ee9e9013efa6 to your computer and use it in GitHub Desktop.
Save arled/cb01c1e2ee9e9013efa6 to your computer and use it in GitHub Desktop.
Check array for given string
var elements = ["apple", "banana", "cherry"]
if contains(elements, "banana") {
println("yep")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment