Array.prototype.indexOf() - JavaScript | MDN
http://devdoc.net/web/developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf.html
WebMay 17, 2017 · The indexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present. Note: For the String method, see String.prototype.indexOf(). var a = [2, 9, 9]; . a.indexOf(2); // 0 . a.indexOf(7); // -1. if (a.indexOf(7) === -1) { // element doesn't exist in array. } Syntax.
DA: 42 PA: 55 MOZ Rank: 88