jquery find string in array code example
Example 1: jquery in array
function isInArray(value, array) {
return array.indexOf(value) > -1;
}
Example 2: find string in array javascript
var myarr = ["I", "like", "turtles"];
var arraycontainsturtles = (myarr.indexOf("turtles") > -1);
Example 3: js inarray
array.includes(élémentRecherché)
array.includes(élémentRecherché, indiceDépart)