We can determine the length of a string using the built in property
In this example we have a variable called txt which contains all 26 letters of the alphabet.
var txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
document.getElementById("demo").innerHTML = txt.length;
To output the
length of this string, we can set our
innerHTML property to