up
This commit is contained in:
parent
e8db0f9c9f
commit
cce95cb631
13 changed files with 16955 additions and 50 deletions
15
8-async/02-promise-basics/03-animate-circle-promise/task.md
Normal file
15
8-async/02-promise-basics/03-animate-circle-promise/task.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
|
||||
# Animated circle with promise
|
||||
|
||||
Rewrite the `showCircle` function in the solution of the task <info:task/animate-circle-callback> so that it returns a promise instead of accepting a callback.
|
||||
|
||||
The new usage:
|
||||
|
||||
```js
|
||||
showCircle(150, 150, 100).then(div => {
|
||||
div.classList.add('message-ball');
|
||||
div.append("Hello, world!");
|
||||
});
|
||||
```
|
||||
|
||||
Take the solution of the task <info:task/animate-circle-callback> as the base.
|
Loading…
Add table
Add a link
Reference in a new issue