https://www.w3schools.com/js/tryit.asp?filename=tryjs_string_length <!DOCTYPE html> <html> <body> <h2>JavaScript String Properties</h2> <p>The length property returns the length of a string:</p> <p id="demo"></p> <script> var txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; document.getElementById("demo").innerHTML = txt.length; </script> </body> </html> |