Friday, October 17, 2014

Write A program to print 1 to 10 using do….while loop using Javascript .


Write A program to print 1 to 10 using do….while loop using Javascript .
Code : do-while.html

<html>
<head>
<script type="text/javascript">
var i=0;
</script>
</head>
<body>
<script type="text/javascript">
do
{
document.write(i);
document.write("<br>");
i+=1;
} while(i<10);
</script>
</body>
</html>

No comments: