- Notifications
You must be signed in to change notification settings - Fork184
Promise#160
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Promise#160
Changes fromall commits
Commits
Show all changes
11 commits Select commitHold shift + click to select a range
7148f00 bromise basics
didostapb283141 Update 1-js/11-async/02-promise-basics/article.md
tarasyyyka639797 Update 1-js/11-async/02-promise-basics/article.md
tarasyyyk2fd1075 Update 1-js/11-async/02-promise-basics/article.md
tarasyyyk362b34b Update 1-js/11-async/02-promise-basics/article.md
tarasyyyk5c61fe3 Update 1-js/11-async/02-promise-basics/article.md
tarasyyyk12d1159 Remove unnecessary line
tarasyyyk4461dc1 Update 1-js/11-async/02-promise-basics/03-animate-circle-promise/solu…
tarasyyyk68bbd0d Update 1-js/11-async/02-promise-basics/article.md
tarasyyykef7b1e8 Update 1-js/11-async/02-promise-basics/article.md
tarasyyyk027693e Correct lines, remove unnecessary lines
tarasyyykFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
4 changes: 2 additions & 2 deletions1-js/11-async/02-promise-basics/01-re-resolve/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| Результат буде: `1`. | ||
| Другий виклик`resolve`проігнорується, оскільки враховується тільки перший виклик`reject/resolve`. Всі наступні їхні виклики ігноруються. |
4 changes: 2 additions & 2 deletions1-js/11-async/02-promise-basics/01-re-resolve/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| #Чи можливо "перевиконати" проміс? | ||
| Що виведе код нижче? | ||
| ```js | ||
| let promise = new Promise(function(resolve, reject) { | ||
4 changes: 2 additions & 2 deletions1-js/11-async/02-promise-basics/02-delay-promise/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions1-js/11-async/02-promise-basics/02-delay-promise/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,14 @@ | ||
| #Затримка на промісах | ||
| Вбудована функція`setTimeout`використовує колбек-функції. Створіть альтернативу яка базується на промісах. | ||
| Функція`delay(ms)`повинна повертати проміс, який перейде в стан `resolved` через `ms`мілісекунд, так щоб ми могли додати до нього`.then`: | ||
| ```js | ||
| function delay(ms) { | ||
| //ваш код | ||
| } | ||
| delay(3000).then(() => alert('виконалось через 3секунди')); | ||
| ``` |
4 changes: 2 additions & 2 deletions1-js/11-async/02-promise-basics/03-animate-circle-promise/solution.view/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions1-js/11-async/02-promise-basics/03-animate-circle-promise/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| #Анімація круга за допомогою проміса | ||
| Перепишіть функцію `showCircle`, написану в завданні [Анімація круга за допомогою колбека]<info:task/animate-circle-callback>таким чином щоб вона повертала проміс, замість того щоб приймати в аргументи колбек-функцію. | ||
| Нове використання: | ||
| ```js | ||
| showCircle(150, 150, 100).then(div => { | ||
| div.classList.add('message-ball'); | ||
| div.append("Привіт, світ!"); | ||
| }); | ||
| ``` | ||
| Візьміть за основу рішення з завдання [Анімація круга за допомогою колбека]<info:task/animate-circle-callback>. |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.