Every array element has an index. This method returns the index of an element in an array. a. If specific element doesn’t exist within array, indexOf() returns -1. Hence, this method can be used to ...