Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
Zero-based index at which to start searching backwards, converted to an integer.
Finding all the occurrences of an element
The following example uses lastIndexOf to find all the indices of an element in a given array, using push() to add them to another array as they are found.
Finding all the occurrences of an element
The following example uses lastIndexOf to find all the indices of an element in a given array, using push() to add them to another array as they are found.
Array.prototype.findLastIndex()
TypedArray.prototype.lastIndexOf()
String.prototype.lastIndexOf()
This page was last modified on Jul 10, 2025 by MDN contributors.