Javascript examples for String:Quiz
Use the length property to display the length of a string variable's value.
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var txt = "Hello World!"; document.getElementById("demo").innerHTML = txt.length; </script>/*from w ww.j a v a 2 s . c o m*/ </body> </html>