Write A program to print 1 to 10 using while loop .
Code : whileloop.html
<html>
<head>
<script type="text/javascript">
var i=1;
</script>
</head>
<body>
<script type="text/javascript">
while(i<10)
{
document.write(i);
document.write("<br>");
i+=2;
}
</script>
</body>
</html>
No comments:
Post a Comment