function checkContains(mycolor) { var colorArr= Array("RED","BLUE","YELLOW");
if(contains(colorArr,mycolor)){
document.write(mycolor+'<b> Color</b> is there.'); }else{ document.write('Not there.'); }
}
// contains function function contains(arr, findValue){ var i = arr.length; while (i--){ if (arr[i]=== findValue) return true; } return false; } </script> </head>
<body>
<SCRIPT language="JavaScript">
checkContains("RED");
</SCRIPT>
</body> </HTML>
_________________ Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )