Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Master Vue.js with Vue School Premium

$25 / month

Modern JavaScript: ES6 and beyond!

Get access to this course, 18 others, and future Vue.js courses!

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.