<html>
<body>
<p>Click the button to return the number of characters in the string "Hello World!".</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var str = "Hello World!";
var n = str.length;
document.getElementById("demo").innerHTML = n;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_length_string by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 14:03:04 GMT -->
</html>