Is there a way to ensure that the program works properly so that when the user inputs a value, it is included in the multiplication table?
<html>
<head>
<title> Multiplication Table </title>
<style>
body{
font-family: arial;
font-size: 20px;
}
</style>
</head>
<body>
<br>
<h3> Multiplication Table </h3>
<button onclick="myFunction()">Enter Number </button>
<script language ="JavaScript">
function myFunction(){
var num = prompt("Please enter your number", 0);
document.write("<center><table border ='1px'>");
for var (a =1; a <= num; a++) {
document.write("<tr style='height:40px'>");
for(var b =1; b<= 10; b++) {
document.write("<td style='width:40px'><center><font size = '4'>" + a*b + "<.center></font></td>");
}
document.write("</tr>");
}
}
document.write("</table></center>");
</script>
</body>
</html>