Java Script Example for FOR..IN loop for finding String Length

<html >
<head>
<title>Java Script Example for FOR..IN LOOP</title>
<script type="text/javascript">
var str="Sonam Jamtsho";
var i;
var len=0;
for(i in str)
 {
  len++;
 }
 document.write("The length of the string is: "+len);
</script>
</head>

<body></body>
</html>

Comments

Popular posts from this blog

ACTION_FAILED:OU_INVALID: Solution for GoogleApps bulk user upload issue, username@domainname.com:ACTION_FAILED:OU_INVALID. This error is because you have not specified the Org Unit Path properly.

Moodle OAuth 2. This account is pending email confirmation! Solved

Enable SIP2 in Koha. How to configure SIP server in Koha 18.11??