From 16cc913cadc32333175119181ce2e5465f3169c5 Mon Sep 17 00:00:00 2001 From: "DESKTOP-8HAFCLV\\Yugr" Date: Thu, 26 Jun 2025 21:11:50 +0400 Subject: [PATCH] Lesson 1.2 complete --- src/index.ts | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/index.ts b/src/index.ts index 75a1cff..fb96a1f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,11 +1,20 @@ -import readline from 'node:readline'; +function DrawLine(count: number){ + const minimalString = '*'; + console.log(minimalString.repeat(count)); +} + +let chisloN: number = 10; + +//i++ => i = i + 1 +//i-- => i = i - 1 +//--i => i = i - 1 + +// for(let i = 0; i < count; i++){ + // str = str + '*' // i = 0 => str = '*' // i == 1 => '**' // i = 2 => '***' + // } + +for(let index = 1; index <= chisloN; index++){ + DrawLine(index); +} -const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout, -}); -rl.question('Enter something', value => { - console.log(`Hi ${value}`); - rl.close; -}); \ No newline at end of file