Find Length Of the String in JavaScript

<script type="text/javascript">

var txt = "Forget Code";
document.write(txt.length);

</script> 

Output of the above code will be
11