HuyPV
Friday, December 10, 2010
function in_array(v, arr) {
for (index in arr) {
if (arr[index] == v) return true;
}
return false;
}
alert(in_array('huypv', ['huypv', 'vinhnd', 'tungns', 'namhh']));
// var arr = currentList.split(', ');
Title:
js function in_array
Description:
function in_array(v, arr) { for (index in arr) { if (arr[index] == v) return true; } return false; } alert(in_array(...
...
Rating:
4