xxxxxxxxxx
arr := ["a", "b", "", "d"]
MsgBox % HasVal(arr, "a") "`n" ; return 1
;MsgBox % HasVal(arr, "e") "`n" ; return 0
;MsgBox % HasVal(arr, "d") ; return 4
;Functions
HasVal(haystack, needle)
{
if !(IsObject(haystack)) || (haystack.Length() = 0)
return 0
for index, value in haystack
if (value = needle)
return index
return 0
}