Skip to content

Instantly share code, notes, and snippets.

@paulakreuger
Created April 22, 2014 14:21
Show Gist options
  • Save paulakreuger/11181099 to your computer and use it in GitHub Desktop.
Save paulakreuger/11181099 to your computer and use it in GitHub Desktop.
Check if array contains variable
/* ==CHECK IF ARRAY CONTAINS VARIABLE
-----------------------------------------------------*/
function oc(a) {
var o = {};
for(var i=0;i<a.length;i++){
o[a[i]]='';
}
return o;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment