From d58fdd0f40be42f29ea101ed531fd2dabdfa68a3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 12 Feb 2019 15:24:05 +0100 Subject: [PATCH 1/2] 3 task complete --- app/zadanie01.js | 8 +++++++- app/zadanie02.js | 25 ++++++++++++++++++++++++- app/zadanie03.js | 17 ++++++++++++++++- 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/app/zadanie01.js b/app/zadanie01.js index 8c20173..f4304fd 100644 --- a/app/zadanie01.js +++ b/app/zadanie01.js @@ -1 +1,7 @@ -//Twój kod \ No newline at end of file +//Twój kod + +const hello = setTimeout(() => { + console.log("hello Node.js") +}, 5000) + +clearInterval(hello) \ No newline at end of file diff --git a/app/zadanie02.js b/app/zadanie02.js index 8c20173..91a010f 100644 --- a/app/zadanie02.js +++ b/app/zadanie02.js @@ -1 +1,24 @@ -//Twój kod \ No newline at end of file +//Twój kod +console.log("Witam") +setTimeout(() => { + console.log("Node.js") +}, 4000) +setTimeout(() => { + console.log("się") +}, 1000) +setTimeout(() => { + console.log("i korzystam") +}, 6000) +setTimeout(() => { + console.log("w konsoli") +}, 5000) +setTimeout(() => { + console.log("z funkcji czasu!") +}, 7000) +setTimeout(() => { + console.log("z") +}, 2000) +setTimeout(() => { + console.log("programem") +}, 3000) + diff --git a/app/zadanie03.js b/app/zadanie03.js index 8c20173..970b090 100644 --- a/app/zadanie03.js +++ b/app/zadanie03.js @@ -1 +1,16 @@ -//Twój kod \ No newline at end of file +//Twój kod + +const arr = process.argv; + +if(arr.length >= 4){ + const newArr = []; + for(let i=2; i< arr.length; i++){ + newArr.push(Number(arr[i])) + }; + const sum = newArr.reduce((a, c) => { + return a + c; + }); + console.log(sum); +}else{ + console.log("I need two or more argument bro") +} From 1e163219527017615b6870a6acd6a1e8ff0f3169 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 12 Feb 2019 16:07:02 +0100 Subject: [PATCH 2/2] Daily task complete --- app/zadanieDnia.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/zadanieDnia.js b/app/zadanieDnia.js index 8c20173..1eb0192 100644 --- a/app/zadanieDnia.js +++ b/app/zadanieDnia.js @@ -1 +1,17 @@ -//Twój kod \ No newline at end of file +//Twój kod + +const arr = process.argv; +const newArr=[]; + +for(let i=2; i { + console.log(el) + }, el*1000 ) +}) \ No newline at end of file