You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`fromIndex` (optional): The position to start searching backward from. Defaults to the string’s length.
28
28
29
+
**Return value:**
30
+
31
+
Returns an integer representing the index of the last occurrence of the specified substring within the string. If the substring isn’t found, it returns `-1`.
32
+
29
33
## Example 1: Finding the Last Mention of a Name
30
34
31
35
In this example, a chat message contains multiple mentions of a person’s name, and the method finds the last one:
0 commit comments