Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion app/zadanie01.js
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
//Twój kod
//Twój kod

const hello = setTimeout(() => {
console.log("hello Node.js")
}, 5000)

clearInterval(hello)
25 changes: 24 additions & 1 deletion app/zadanie02.js
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
//Twój kod
//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)

17 changes: 16 additions & 1 deletion app/zadanie03.js
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
//Twój kod
//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")
}
18 changes: 17 additions & 1 deletion app/zadanieDnia.js
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
//Twój kod
//Twój kod

const arr = process.argv;
const newArr=[];

for(let i=2; i<arr.length; i++){
newArr.push(Number(arr[i]));
};


// console.log(newArr);
newArr.forEach(function(el){

setTimeout(() => {
console.log(el)
}, el*1000 )
})