JavaScript String_search Guide
String search methods: indexOf, includes, startsWith, endsWith, and match for finding content in strings. The guide walks through String Search. `str.indexOf(sub)` — position or -1. `str.includes(sub)` — boolean. `str.startsWith(prefix)` / `str.endsWith(suffix)` — check edges. `str.search(regex)` — regex position. `str.match(regex)` — array of matches. `str.matchAll(regex)` — iterator of all matches (including capture groups). `str.localeCompare(other)` — language-aware comparison. The guide is organized into 1 sections that build on each other, each pairing a prose explanation with runnable code. Related guides: Arrays, Strings, Numbers, Math, Date. This is one of 145 JavaScript guides on JS Reference — see the full list on the guides page. Practice what you learn in the JavaScript playground, and look up any unfamiliar term in the JavaScript glossary.