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") +} 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