Try this:
if(blockedTile.indexOf("118") != -1)
{
// element found
}
More Related Contents:
- Creating a JavaScript global array with static elements?
- Array.prototype.fill() with object passes reference and not new instance
- JavaScript “new Array(n)” and “Array.prototype.map” weirdness
- Convert array to JSON
- How to find if an array contains a specific string in JavaScript/jQuery?
- Sum JavaScript object propertyA values with the same object propertyB in an array of objects
- How to change value of object which is inside an array using JavaScript or jQuery?
- How might I extract the property values of a JavaScript object into an array?
- Sampling a random subset from an array
- Convert JavaScript array of 2 element arrays into object key value pairs
- Selecting last element in JavaScript array [duplicate]
- JavaScript flattening an array of arrays of objects
- Best way to convert string to array of object in javascript?
- How to create an array in JavaScript whose indexing starts at 1?
- How to check if a string array contains one string in JavaScript? [duplicate]
- MongoDB select where in array of _id?
- Filter array of objects whose any properties contains a value
- Search array of objects for entry matching variable and check if it matches other fields
- How to get the first element of an array?
- Is array both associative and indexed?
- Javascript 2d array indexOf
- Javascript oddness with array of objects and indexOf
- Convert js Array() to JSon object for use with JQuery .ajax
- What does “[Ljava.lang.Object;@” mean?
- A better way to splice an array into an array in javascript
- Sum values from an array of key-value pairs in JavaScript
- Create a dynamic nested object from array of properties
- Most efficient way to prepend a value to an array
- Vue JS returns [__ob__: Observer] data instead of my array of objects
- filter array of objects by another array of objects