In this article we will discuss how to length of the string variable in JavaScript using length property.
<script type="text/javascript">
alert("iam a alert".length);
</script>
Output:
<script type="text/javascript">
var myString = ".net tutorial site";
alert(myString.length);
</script>
Output: