15 lines
304 B
JavaScript
15 lines
304 B
JavaScript
|
function main() {
|
||
|
var numAst = document.getElementById('numeroDeAsteriscos').value;
|
||
|
for (let a = 1; a < numAst; a++) {
|
||
|
|
||
|
for (let i = 0; i < a; i++) {
|
||
|
document.writeln(`*`);
|
||
|
}
|
||
|
document.writeln(`<br>`)
|
||
|
|
||
|
}
|
||
|
for (let i = 0; i < numAst / 2; i++) {
|
||
|
document.writeln(`*<br>`)
|
||
|
}
|
||
|
}
|