Java Script, For loop Example, Array
<html>
<head>
<title>JavaScript Example for For Loop</title>
<script type="text/javascript">
var myarray=new Array(5);
myarray[0]="Sonam";
myarray[1]="Jamtsho";
myarray[2]="Karma";
myarray[3]="Phuntsho";
myarray[4]="Tshering";
var i;
for(i=0;i<myarray.length;i++)
{
document.write("array["+i+"]= "+myarray[i]);
document.write("</br>");
}
</script>
</head>
<body></body>
</html>
<head>
<title>JavaScript Example for For Loop</title>
<script type="text/javascript">
var myarray=new Array(5);
myarray[0]="Sonam";
myarray[1]="Jamtsho";
myarray[2]="Karma";
myarray[3]="Phuntsho";
myarray[4]="Tshering";
var i;
for(i=0;i<myarray.length;i++)
{
document.write("array["+i+"]= "+myarray[i]);
document.write("</br>");
}
</script>
</head>
<body></body>
</html>
Comments
Post a Comment