Print Series 10 to 0 in Java Script
Example :
<html>
<head>
<title>Print Series 10-0</title>
</head>
<body>
<script>
var i;
for(i=10;i>=0;i--)
{
document.write(i+" ");
}
</script>
</body>
</html>
Print Series 10 to 0 in Java Script on Button Click Using Function
Example:
<html>
<head>
<title>Print Series 10-0 using Function</title>
<script>
function series()
{
var i;
for(i=10;i>=0;i--)
{
document.write(i+" ");
}
}
</script>
</head>
<body>
<form name="frm1">
<input type="button" name="btn1" value="series 10-0"
onclick="series()" />
</form>
</body>
</html>