Finished multi-multiplication table
This commit is contained in:
parent
23adce80cf
commit
67f3590a75
5
9.html
5
9.html
|
@ -2,6 +2,11 @@
|
|||
|
||||
<head>
|
||||
<meta name="" charset="UTF-8" content="">
|
||||
<style>
|
||||
* {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
4
9.js
4
9.js
|
@ -1,13 +1,15 @@
|
|||
function multiplicador(multipl) {
|
||||
document.write(`<p align=center>`)
|
||||
for (let i = 1; i < 11; i++) {
|
||||
document.writeln(`${multipl} * ${i} = ${i * multipl}<br>`)
|
||||
}
|
||||
// Adding horizontal line for visual clarity
|
||||
document.write(`</p>`)
|
||||
document.writeln(`<hr>`)
|
||||
}
|
||||
|
||||
function main() {
|
||||
// Declaring multi to hold the second number
|
||||
// Declaring multi to hold the first number
|
||||
var multi = 1;
|
||||
|
||||
// For loop that and for every time the multiplier function ends, run multi++ to sum
|
||||
|
|
Loading…
Reference in New Issue