Js Strings Methods — Free Javascript Tutorial

Learn Js Strings Methods in Javascript with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

Js Strings Methods — Free Javascript Tutorial

Learn Js Strings Methods in Javascript with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

✓ 100% Free ✓ No Login Needed ✓ NCERT / CBSE Aligned ✓ Download as PDF

TL;DR: Learn Js Strings Methods in Javascript with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

Written & reviewed by the Syllab.in Academic Team (CBSE/NCERT subject experts) · Updated

🤖 Stuck on any question? Ask Syllab's free AI Tutor for a step-by-step explanation — instant, unlimited, no login.

Js Strings Methods in Javascript

Strings in JS are immutable sequences of characters. Use single quotes, double quotes, or backticks (template literals).

Key methods: `.length`, `.toUpperCase()`, `.toLowerCase()`, `.trim()` (remove spaces), `.split()`, `.join()`, `.includes()`, `.startsWith()`, `.endsWith()`.

Slicing: `.slice(start, end)` — end not included. `.substring(start, end)` — similar. `.charAt(index)` or `str[index]`.

Replace: `.replace(old, new)` — first occurrence only. `.replaceAll(old, new)` — all. `.repeat(n)` — repeat string n times.

Learn Js Strings Methods step by step with Syllab's free interactive Javascript tutorial — runnable code examples, practice exercises and instant AI feedback, all free with no signup. Explore the full Javascript course →