Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
6 changes: 5 additions & 1 deletion app/zadanie01.js
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
//Twój kod
//Twój kod
console.log('Radek Micinski');
let myTimeout = setTimeout(()=>{
console.log("Wita się z node.js")
},5000)
24 changes: 23 additions & 1 deletion app/zadanie02.js
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
//Twój kod
//Twój kod
console.log('Witam');
let myTimeout1 = setTimeout(()=>{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Działać - działa, ale dwie rzeczy

  1. Czy jakiś pomysł jak to zautomatyzować :) ?
  2. const będzie tu lepszy - nigdy nie potrzebujemy zmieniać raz dodanego timeout id.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dzięki :) już poprawiam rozwiązanie

console.log("się")
},1000);
let myTimeout2 = setTimeout(()=>{
console.log("z")
},2000);
let myTimeout3 = setTimeout(()=>{
console.log("programem")
},3000);
let myTimeout4 = setTimeout(()=>{
console.log("Node.js")
},4000);
let myTimeout5 = setTimeout(()=>{
console.log("w konsoli")
},5000);
let myTimeout6 = setTimeout(()=>{
console.log("i korzystam")
},6000);
let myTimeout7 = setTimeout(()=>{
console.log("z funkcji czasu!")
},7000);
8 changes: 7 additions & 1 deletion app/zadanie03.js
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
//Twój kod
//Twój kod

let result = 0;
for (let i=2; i<process.argv.length;i++){
result = result + Number(process.argv[i])
}
console.log(result)
10 changes: 9 additions & 1 deletion app/zadanieDnia.js
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
//Twój kod
//Twój kod



for(let i = 2; i<process.argv.length; i++){
setTimeout(()=>{
console.log(process.argv[i])
}, Number(process.argv[i])*1000)
}