Programa que realiza la tabla de multiplicar del 5 y del 8
<meta charset="UTF-8">
<script>
var num = 5;
document.write("<h3>Tabla del " + num + "</h3>");
document.write(num + " * 1 = " + num * 1 + "<br>");
document.write(num + " * 2 = " + num * 2 + "<br>");
document.write(num + " * 3 = " + num * 3 + "<br>");
document.write(num + " * 4 = " + num * 4 + "<br>");
document.write(num + " * 5 = " + num * 5 + "<br>");
document.write(num + " * 6 = " + num * 6 + "<br>");
document.write(num + " * 7 = " + num * 7 + "<br>");
document.write(num + " * 8 = " + num * 8 + "<br>");
document.write(num + " * 9 = " + num * 9 + "<br>");
document.write(num + " * 10 = " + num * 10 + "<br>");
document.write("<br><br>");
num = 8;
document.write("<h3>Tabla del " + num + "</h3>");
document.write(num + " * 1 = " + num * 1 + "<br>");
document.write(num + " * 2 = " + num * 2 + "<br>");
document.write(num + " * 3 = " + num * 3 + "<br>");
document.write(num + " * 4 = " + num * 4 + "<br>");
document.write(num + " * 5 = " + num * 5 + "<br>");
document.write(num + " * 6 = " + num * 6 + "<br>");
document.write(num + " * 7 = " + num * 7 + "<br>");
document.write(num + " * 8 = " + num * 8 + "<br>");
document.write(num + " * 9 = " + num * 9 + "<br>");
document.write(num + " * 10 = " + num * 10 + "<br>");
</script>