JavaScript String Properties

About This Index
This page is the JavaScript String Properties index for the tutorial track. Each row links to a full guide with syntax, examples, and FAQs.
Learn what a String is on /js/string. Use this page for length, constructor, and prototype. Functions such as slice() live on the String Methods index.
"Hello".length is a number. "Hello".length() throws, because length is not a function.
How to Read a String Property
Properties are values on the string. No parentheses:
const title = "JavaScript";
title.length; // 10
"".length; // 0
"😀".length; // 2 (UTF-16 code units)
title.constructor; // String
typeof title; // "string" JavaScript String Properties Table
Property guides in this JavaScript tutorial series (3 tutorials).
Instance properties
2 propertiesDefined on String.prototype or as own properties of each string. Read them with no parentheses.
| Property | Description | Tutorial |
|---|---|---|
length | Read-only count of UTF-16 code units. An emoji such as 😀 can count as 2. | Open |
constructor | The String constructor function (see the String() tutorial). Instance .constructor also points here. | Open |
Static properties
1 propertyRead these on the String constructor itself, not on a string value.
Frequently Asked Questions
Start with length
Open the property guide—syntax, emoji pitfalls, and FAQs.
CODETOFUN NEWS
Stay Ahead in Tech
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
8 people found this page helpful
