Fix semicolons, remove old note in 1.11.8

This commit is contained in:
Vse Mozhe Buty 2020-11-01 01:45:02 +02:00
parent 9a6a9fb584
commit 37c6a31de5
3 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@ function loadJson(url) {
} else {
throw new Error(response.status);
}
})
});
}
loadJson('no-such-user.json')

View file

@ -1,7 +1,7 @@
# Rewrite "rethrow" with async/await
Below you can find the "rethrow" example from the chapter <info:promise-chaining>. Rewrite it using `async/await` instead of `.then/catch`.
Below you can find the "rethrow" example. Rewrite it using `async/await` instead of `.then/catch`.
And get rid of the recursion in favour of a loop in `demoGithubUser`: with `async/await` that becomes easy to do.
@ -22,7 +22,7 @@ function loadJson(url) {
} else {
throw new HttpError(response);
}
})
});
}
// Ask for a user name until github returns a valid user

View file

@ -156,7 +156,7 @@ class Thenable {
// resolve with this.num*2 after 1000ms
setTimeout(() => resolve(this.num * 2), 1000); // (*)
}
};
}
async function f() {
// waits for 1 second, then result becomes 2