-
Notifications
You must be signed in to change notification settings - Fork 172
Complete all tasks #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Complete all tasks #151
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| const showTime = function() { | ||
| const time = (new Date()).toLocaleTimeString(); | ||
| console.log(time); | ||
| } | ||
|
|
||
| showTime(); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| const sayHello = function(userName) { | ||
| console.log("Cześć", userName, "!"); | ||
| } | ||
|
|
||
| sayHello('devmentor.pl'); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| const sumNumbers = function(x) { | ||
| let result = 0; | ||
|
|
||
| for(let i = 0; i <= x; i++ ) { | ||
| result += i; | ||
| } | ||
|
|
||
| return result; | ||
| } | ||
| console.log(sumNumbers(4)); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| let counter = 0; | ||
|
|
||
| const runTimer = function() { | ||
| const time = (new Date()).toLocaleTimeString(); | ||
| console.log(time); | ||
| counter++; | ||
| console.log(counter); | ||
|
|
||
| if(counter >= 5) { | ||
| clearInterval(intervalId); | ||
| console.log("Timer stop!"); | ||
|
Comment on lines
+10
to
+11
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uwaga na odstępy od lewej krawędzi (powinien być dodatkowy bo jesteśmy wew. |
||
| } | ||
| } | ||
|
|
||
| const intervalId = setInterval(runTimer, 5000); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍