How to get the length of a string
- Forrige side JS animasjon
- Neste side JS eksponentiell operasjon
Learn how to find the length of a string in JavaScript.
String length
length
The property returns the length of the string:
Example
var txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var len = txt.length;
Related pages
Tutorial:JavaScript streng
Reference manual:JavaScript length egenskab
- Forrige side JS animasjon
- Neste side JS eksponentiell operasjon