19 lines
457 B
JavaScript
19 lines
457 B
JavaScript
|
function multiplicador(multipl) {
|
||
|
for (let i = 1; i < 11; i++) {
|
||
|
document.writeln(`${multipl} * ${i} = ${i * multipl}<br>`)
|
||
|
}
|
||
|
// Adding horizontal line for visual clarity
|
||
|
document.writeln(`<hr>`)
|
||
|
}
|
||
|
|
||
|
function main() {
|
||
|
// Declaring multi to hold the second number
|
||
|
var multi = 1;
|
||
|
|
||
|
// For loop that and for every time the multiplier function ends, run multi++ to sum
|
||
|
for (let a = 1; a < 11; a++) {
|
||
|
multiplicador(multi)
|
||
|
multi++
|
||
|
}
|
||
|
}
|