added cycle while

This commit is contained in:
DESKTOP-8HAFCLV\Yugr 2025-06-27 13:58:54 +04:00
parent 5293c1ee31
commit 5509a95a6e
1 changed files with 10 additions and 2 deletions

View File

@ -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;
// }