javascript
get the location of an item in an array
How to Get the Location of an Item in an Array If you are working with arrays in JavaScript, you may need to find the location of a specific item within the array. Fortunately, this can be done easily using built-in array methods. Method 1: indexOf() The indexOf() method returns