added cycle while
This commit is contained in:
parent
5293c1ee31
commit
5509a95a6e
12
src/index.ts
12
src/index.ts
|
@ -16,6 +16,14 @@ let chisloN: number = 3;
|
|||
// str = str + '*' // i = 0 => str = '*' // i == 1 => '**' // i = 2 => '***'
|
||||
// }
|
||||
|
||||
for(let index = 1; index <= chisloN * 2; index = index + 2){
|
||||
DrawLine(index, chisloN * 2 -index);
|
||||
|
||||
for(let index = 1; index <= chisloN ; ){
|
||||
DrawLine(index, chisloN -index);
|
||||
}
|
||||
|
||||
// let index = 1;
|
||||
// while(index <= chisloN) {
|
||||
// DrawLine(index, chisloN - index);
|
||||
// // console.log(`*: ${index}, space: ${chisloN - index}`);
|
||||
// index = index + 1;
|
||||
// }
|
||||
|
|
Loading…
Reference in New Issue