Code:
<!DOCTYPE html>
<html>
<body>
<h2>Program to Find the length of the String </h2>
<p>Length of the String <b>"Welcome to The Tech Platform" </b> is :</p>
<p id="demo"></p>
<script>
var txt = "Welcome to The Tech Platform";
var sln = txt.length;
document.getElementById("demo").innerHTML = sln;
</script>
</body>
</html>
Output:
![](https://static.wixstatic.com/media/0f65e1_828346f4a5564005832f1a614f5df5be~mv2.png/v1/fill/w_63,h_44,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/0f65e1_828346f4a5564005832f1a614f5df5be~mv2.png)
Source: W3School
The Tech Platform