Skip to content

Instantly share code, notes, and snippets.

@ksaitor
Created September 17, 2012 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ksaitor/3739975 to your computer and use it in GitHub Desktop.
Save ksaitor/3739975 to your computer and use it in GitHub Desktop.
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