JavaScript
JavaScript StringsJavaScript Strings
JavaScript strings store and manipulate text data.
Read Time
5 min readDifficulty
BeginnerLast Updated
Jun 15, 2026Version
v1.0.0Introduction
JavaScript uses strings to hold text like names, paragraphs, or passwords. Strings always sit inside quotes so the computer doesn't confuse them with code commands. You can measure, cut, or combine strings easily.
Syntax
Syntax
Key Points
- Strings require single or double quotes.
- The `length` property counts the characters.
- Backslashes escape special characters inside strings.
- Template literals use backticks to inject variables.