JavaScript Array indexOf()
The JavaScript array indexOf() method is used to search the specified element in the given array and returns the index of the first match. Syntax: array.indexOf (element,index) Parameters: element: It is required and represents the element that has to be searched. index: It is optional and represents the index position from where the search starts. … Read more