Skip to main content

Strings: Methods, Searching and Formatting

Learn Strings: Methods, Searching and Formatting (Phase 3 · Arrays, Strings, Objects (Essential), JavaScript) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Working with text • Strings are immutable: every method returns a new string. • Common methods: length , toUpperCase , toLowerCase , trim , slice , includes , startsWith , endsWith , indexOf , replace / replaceAll , split , padStart , repeat . • Template literals use backticks, allow ${expression} interpolation and multi-line text.

More lessons in Phase 3 · Arrays, Strings, Objects (Essential)