Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
Substring to search for. All values are coerced to strings, so omitting it or passing undefined causes indexOf() to search for the string "undefined", which is rarely what you want.
indexOf() and case-sensitivity
The following example defines two string variables.
String.prototype.lastIndexOf()
This page was last modified on Jul 10, 2025 by MDN contributors.