Last active
December 17, 2015 14:39
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function inArray(array:Array, search_value:String) { | |
for (var i in array) { | |
if (array[i] == search_value) { | |
return true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Made a revision as action script returns false by default.