JavaScript is in array [duplicate]

Try this:

if(blockedTile.indexOf("118") != -1)
{  
   // element found
}

Leave a Comment