Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Strings</h1>
<h2>The length Property</h2>
<p>The length property returns the length of a string.</p>
<p>Find the length of "Hello World!":</p>
<p id="demo"></p>
<script>
let text = "Hello World!";
let length = text.length;
document.getElementById("demo").innerHTML = length;
</script>
</body>
</html>