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
4 changes: 3 additions & 1 deletion app/test.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
console.log('Wygląda na to, że wszystko działa :)');
process.argv.forEach((val, index) => {
console.log(`${index}: ${val}`);
});
3 changes: 2 additions & 1 deletion app/zadanie01.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
//Twój kod
console.log('Maciej Judka');
setTimeout(() => console.log('wita się z Node.js!'), 5000);
11 changes: 10 additions & 1 deletion app/zadanie02.js
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
//Twój kod
timeoutLog = (text, time) => setTimeout(() => console.log(text), time);

timeoutLog('Node.js', 4000);
timeoutLog('się', 1000);
timeoutLog('Witam', 0);
timeoutLog('i korzystam', 6000);
timeoutLog('w konsoli', 5000);
timeoutLog('z funkcji czasu!', 7000);
timeoutLog('z', 2000);
timeoutLog('programem', 3000);
4 changes: 3 additions & 1 deletion app/zadanie03.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
//Twój kod
addArgv = tab => tab.reduce((x, y) => Number(x) + Number(y));

console.log(addArgv(process.argv.slice(2)))
6 changes: 5 additions & 1 deletion app/zadanieDnia.js
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
//Twój kod
let tab = process.argv.slice(2).map(x => Number(x));

sleepSort = tab => tab.forEach(x => setTimeout(() => console.log(x), x*1000))

sleepSort(tab);