Run ❯
Get your
own
website
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
JavaScript Strings
The search() Method
Search a string for "w3Schools", and display the position of the match:
Try it