<script type="text/javascript">
function judge( arr, num){
for(var i=0;i<arr. length;i++)
if(arr[i]===num)
return true;
return false;
}
var arr=[34,"56", true,"hi"] ;
console.log(judge(arr,56));
</script>
<script type="text/javascript">
function judge( arr, num){
for(var i=0;i<arr. length;i++)
if(arr[i]===num)
return true;
return false;
}
var arr=[34,"56", true,"hi"] ;
console.log(judge(arr,56));
</script>