0
34kviews
Write a JavaScript to write out the multiplication table for the no. 5 from 1 to 20 using while loop.
1 Answer
written 6.4 years ago by | modified 3.4 years ago by |
Program :
<!DOCTYPE html>
<html>
<head>
<title>Multiplication Table</title>
</head>
<body>
<h3>Multiplication Table For Number 5</h3>
<script type ="text/javascript">
var t=5;
var i=1;
while(i<=20)
{
document.write(t+ " X " +i+ " = " +i*t+ "<br>");
i++;
}
</script>
</body>
</html>