<script language="JavaScript" type="text/JavaScript">
<!--
var myArr = new Array (1, 2, 3, 55, 4, 5); // Array
function findArrItem (arr, match) { // Array finding function
for (i = 0; i < arr.length; i++) {
if (arr[i] == match) {
return true;
}
}
return false;
}
if (findArrItem (myArr, 55)) { // Statement to find array item
alert ("Item is found!!");
} else {
alert ("Item isn't found!!");
}
//-->
</script>