From 02c95bb4e4493ef19dc64371ab2bfcb127c828b4 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 4 Apr 2024 01:33:02 +0100 Subject: [PATCH] Reduce repetition in app.ts --- app.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app.ts b/app.ts index 2a97505..c81e969 100644 --- a/app.ts +++ b/app.ts @@ -1,6 +1,4 @@ -console.log("hello world"); -console.log("nice to meet you!!"); -console.log("hello world"); -console.log("nice to meet you!!"); -console.log("hello world"); -console.log("nice to meet you!!"); +for (let i = 0; i < 3; i++) { + console.log("hello world"); + console.log("nice to meet you!!"); +}