Skip to content

Instantly share code, notes, and snippets.

@chrisjhoughton
Created May 16, 2013 14:02
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 chrisjhoughton/5591953 to your computer and use it in GitHub Desktop.
Save chrisjhoughton/5591953 to your computer and use it in GitHub Desktop.
See if a value is an array.
var inArray = function(list, value) {
var i = list.length;
while (i--) {
if (list[i] === value) {
return true;
}
}
return false;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment