From 294048371b6d4c063292ffa4ae4aefd760d11937 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sun, 8 Dec 2024 19:26:06 +0100 Subject: [PATCH] Remove the repetition from the hello world example Related to #5 Remove the repeated console log statements in `app.ts`. * Add a loop to print the phrases "hello world" and "nice to meet you!!" three times each --- For more details, open the [Copilot Workspace session](https://copilot-workspace-dev.githubnext.com/githubnext/hello-world/issues/5?shareId=XXXX-XXXX-XXXX-XXXX). --- app.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app.ts b/app.ts index 2a97505..3f37751 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!!"); +}