From 3ae8cc60e379b0d12a568fc7ea597155afea383e Mon Sep 17 00:00:00 2001 From: Viktor Gulko Date: Mon, 26 Jan 2026 19:35:07 +0200 Subject: [PATCH 1/2] prerared h1 to loop task and added js --- app.js | 0 index.html | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 app.js diff --git a/app.js b/app.js new file mode 100644 index 0000000..e69de29 diff --git a/index.html b/index.html index b8974cf..b115c57 100644 --- a/index.html +++ b/index.html @@ -4,8 +4,9 @@ Document + -

Hello world!

+

Loop under the Hood

\ No newline at end of file From aeff62b5e3250e8d35414fff8876a721c9ca52b5 Mon Sep 17 00:00:00 2001 From: Viktor Gulko Date: Mon, 26 Jan 2026 19:43:02 +0200 Subject: [PATCH 2/2] added loop to app.js --- app.js | 8 ++++++++ index.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index e69de29..c9a9ea3 100644 --- a/app.js +++ b/app.js @@ -0,0 +1,8 @@ +const n = 4; +let sum = 0; + +for (let i = 1; i <= n; i++) { + sum += i; +} + +console.log(sum); \ No newline at end of file diff --git a/index.html b/index.html index b115c57..056c6e3 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Document - +

Loop under the Hood