Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
find object in array function
function has(arr, obj){
for (var i = 0; i < arr.length; i++) {
if (arr[i] == obj) return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.