Skip to content

Instantly share code, notes, and snippets.

@joelremix
Created June 3, 2014 17:30
Show Gist options
  • Save joelremix/76557217f45ad96ade6d to your computer and use it in GitHub Desktop.
Save joelremix/76557217f45ad96ade6d to your computer and use it in GitHub Desktop.
JS: inArray function
function contains(a, obj)
{
var i = a.length;
while (i--)
{
if (a[i] === obj)
{
return true;
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment