Run ❯
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
JavaScript Strings
The indexOf() Method
Both indexOf() and lastIndexOf() return -1 if the text is not found: