update snippets 0-All

This commit is contained in:
Stefan Feješ
2017-12-25 14:49:52 +01:00
parent 5b23bade1c
commit db9e613058
33 changed files with 155 additions and 63 deletions

View File

@ -6,11 +6,12 @@ Delay executing part of an `async` function, by putting it to sleep, returning a
```js
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
/*
```
```js
async function sleepyWork() {
console.log('I\'m going to sleep for 1 second.');
await sleep(1000);
console.log('I woke up after 1 second.');
}
*/
```