Js Check If Index Exists In Array Literal In Java