Modern JavaScript: ES6 and beyond!

Watch this course for FREE this weekend only.
Create an account to start watching.

or

Learn Array.indexOf in JavaScript

In this lesson, we'll learn how to use the Array.indexOf helper method that was introduced to JavaScript in ES6.

The indexOf method is straight forward method, that allows us to find the index of a given element if it exists in the array.