- Home
- /
- Tutorials
- /
- JavaScript Tutorial
- /
- JavaScript Strings
JavaScript Strings
JavaScript Strings
A JavaScript string holds text, written inside quotes.
Single and double quotes do exactly the same job.
Backticks do something extra, which the next lesson covers.
Example
Example
javascript
const name = "Ada Lovelace";
console.log(name.length);The output is 12, counting the space.
What is a String?
A string is a sequence of characters.
length tells you how many characters it holds.
Each character has an index, starting at 0.
