Fix format bug
This commit is contained in:
parent
2a5e82f32c
commit
6c518693dc
12
index.html
12
index.html
@ -78,15 +78,13 @@
|
||||
var subOffset = 0;
|
||||
var addOffset = 1;
|
||||
}
|
||||
for (let i = 0; i < mid - addOffset; i++) {
|
||||
for (let i = 0; i < mid + addOffset; i++) {
|
||||
for (let j = 0; j < i; j++) {
|
||||
if (i % 2 == 1) {
|
||||
if (i != (mid - 1)) {
|
||||
if (i == 0 || (j == 0 || j == (i - 1))) { // Check if we're at the beginning or end of the line
|
||||
document.getElementById("jsOutput").innerHTML += "*";
|
||||
} else {
|
||||
document.getElementById("jsOutput").innerHTML += " ";
|
||||
}
|
||||
if (i == 0 || (j == 0 || j == (i - 1))) { // Check if we're at the beginning or end of the line
|
||||
document.getElementById("jsOutput").innerHTML += "*";
|
||||
} else {
|
||||
document.getElementById("jsOutput").innerHTML += " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user