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>
<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
Post a Comment