Searching Arrays with indexOf and lastIndexOf

Array.prototype.lastIndexOf()

The lastIndexOf() method returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex.


Source: Mozilla, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf
Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.