var arr = ['a','b','c'];
console.log(in_array('b',arr)); // true
function in_array(search,array){
for(var i in array){
if(array[i]==search){
return true;
}
}
return false;
}
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!