I am trying to make a program in which can print a multiplication table (a typical one, like the ones found in notebooks in table order). This table uses inputs in which it defines the perimeter of each axis (number defines length of x axis, multiplier defines y-axis). However, it does not print.
Is there a typo in the code? Thanks.
Code:
function addNumbers() {
var k;
var l;
for (i = 1; i < l; i++) {
document.write("<tr>");
for (j = 1; j < k; j++) {
document.write("<td>" + j * i + "</td>");
}
document.write("</tr>");
}
}
Enter the number : <input id="k" type="number" min="3" /> Enter the multiplier : <input id="l" type="number" max="11" />
<br>
<br>
<button onclick="addNumbers()">Print Multiplication table</button>