Skip to content

Instantly share code, notes, and snippets.

@chrisslater
Last active December 17, 2015 14:39
Show Gist options
  • Save chrisslater/5626387 to your computer and use it in GitHub Desktop.
Save chrisslater/5626387 to your computer and use it in GitHub Desktop.
Check whether value is in array. Returns true if it is, false if not.
function inArray(array:Array, search_value:String) {
for (var i in array) {
if (array[i] == search_value) {
return true;
}
}
}
@chrisslater
Copy link
Author

Made a revision as action script returns false by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment