Update 20240906/karacsonyfa.js
This commit is contained in:
parent
b8b369a932
commit
91c0d1217a
|
@ -1,3 +1,8 @@
|
|||
let space = ' ';
|
||||
let star = '*';
|
||||
let bar = '|';
|
||||
|
||||
|
||||
for (let i = 1; i < 8; i++){
|
||||
|
||||
let starnum = i + i - 1;
|
||||
|
@ -5,8 +10,6 @@ for (let i = 1; i < 8; i++){
|
|||
let spacenum = (13 - starnum) / 2;
|
||||
//console.log(spacenum);
|
||||
|
||||
let space = ' ';
|
||||
let star = '*';
|
||||
|
||||
let line = space.repeat(spacenum) + star.repeat(starnum) + space.repeat(spacenum);
|
||||
|
||||
|
@ -14,9 +17,10 @@ for (let i = 1; i < 8; i++){
|
|||
}
|
||||
|
||||
let spnum = (13 - 3) / 2;
|
||||
let barnum = 13 - spnum;
|
||||
let barnum = 3;
|
||||
|
||||
|
||||
for (let i = 0; i < 2; i++){
|
||||
let line =
|
||||
let line = space.repeat(spnum) + bar.repeat(barnum) + space.repeat(spnum);
|
||||
console.log(line);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user