WRITE A JAVASCRIPT TO PRINT EVEN NUMBER FROM 1 TO 10
CODE:-
<html>
<head>
<title>Even No</title>
<script type="text/javascript">
var i=1;
document.write("EVEN NUMBERS");
for(i=1;i<=10;i++)
{
if(i%2!=0)
{
document.write("<br>"+i);
}
}
</script>
</head>
<body>
</body>
</html>
No comments:
Post a Comment