TAHIR | First of all thank you very much robert for your heiplt really helped I was finding for this solution for 2 hours but finally I got it I faced 3 or 4 problems in doing this if you can help me a bit more if I write this code like this then why this is not working finevar srch = 'val four';var arr = ['val one', 'val two', 'val three', 'val four', 'val five'];for(var i = 0; i <= arr.length; i++){ if(srch == temp[ii]) { alert('this value is in array'
; }else { alert('this value is not in array'
;}please tell me that why this is not working..thanks again