JavaScript Array indexOf

JavaScript Array indexOf


JavaScript Array indexOf()
In this Tutorial, we will learn about JavaScript Array indexOf() method with the help of following below:
In JavaScript, The indexOf() used to return the first index of occurrence of an array element otherwise if it is not found then returns -1..
Example
Output
Example2
Output