Write JavaScript
code to display odd or even
number. (Using if else statement)
Programme:-
<html>
<body>
<h2><center><font
face="algerian">To display odd or even number.
</h2></center></font>
<script
language="javascript">
var
a
a=prompt("enter
a","a")
a=parseInt(a)
if(a%2==0)
alert("a is even")
}
else
{
</body>
</html>
Output :-
0 Comments
If anyone has Doubts or suggestions please let me know