Revision: 38348
Updated Code
at December 31, 2010 08:31 by cornellsteven
Updated Code
function in_array(needle, haystack) { for (var i=0, j=haystack.length; i < j; i++) { if (needle == haystack[i]) return true; } return false; }
Revision: 38347
Updated Code
at December 31, 2010 08:25 by cornellsteven
Updated Code
function in_array(needle, haystack) { for (var i=0, var j=haystack.length; i < j; i++) { if (needle == haystack[i]) return true; } return false; }
Revision: 38346
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 31, 2010 08:24 by cornellsteven
Initial Code
function in_array(needle, haystack) { for (var i=0; i < haystack.length; i++) { if (needle == haystack[i]) return true; } return false; }
Initial URL
Initial Description
Quick and easy javascript in_array function. It's not perfect, but if you need something quick, this is it.
Initial Title
javascript in_array
Initial Tags
javascript, array
Initial Language
JavaScript