JavaScript From The Start


Finding Matches in Arrays


Hide/Show description

In this tutorial I talk about different approaches to finding matching elements inside of arrays and how you can make your code more efficient. Array.prototype.indexOf() //returns index number Array.prototype.contains() //returns boolean Array.prototype.filter() //returns array Array.prototype.some() //returns boolean Code GIST: https://gist.github.com/prof3ssorSt3v3/2354440544b3a2ba96f65093df6fa280