while
function lineBreak() {
document.write("<br><br>");
}
function print(phrase) {
document.write(phrase);
lineBreak();
}
let number = parseInt(prompt("Ingrese el numero que desea multiplicar"));
let mul = 1;
print("<h1>Tabla de multiplicar con while</h1>");
while (mul <= 10) {
print(number * mul);
mul += 1;
}
for
function lineBreak() {
document.write("<br><br>");
}
function print(phrase) {
document.write(phrase);
lineBreak();
}
let number = parseInt(prompt("Ingrese el numero que desea multiplicar"));
let mul = 1;
print("<h1>Tabla de multiplicar con For</h1>");
for (; mul <= 10; mul++) {
print(number * mul);
}