How to Get the Length of a String
- Previous Page JS Animation
- Next Page JS Exponential Operation
Learn how to find the length of a string in JavaScript.
String Length
length
The attribute returns the length of the string:
Example
var txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var len = txt.length;
Related Pages
Tutorial:JavaScript String
Reference Manual:JavaScript length Attribute
- Previous Page JS Animation
- Next Page JS Exponential Operation