From 7e268536266ba2f08a919e199f59d98bfa5b7754 Mon Sep 17 00:00:00 2001 From: Tien Do Date: Tue, 3 Mar 2020 18:08:14 +0700 Subject: [PATCH 1/2] docs: fix code comment of someAsyncApiCall example --- locale/en/docs/guides/event-loop-timers-and-nexttick.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/en/docs/guides/event-loop-timers-and-nexttick.md b/locale/en/docs/guides/event-loop-timers-and-nexttick.md index 26540519e2538..781a38deb5f87 100644 --- a/locale/en/docs/guides/event-loop-timers-and-nexttick.md +++ b/locale/en/docs/guides/event-loop-timers-and-nexttick.md @@ -341,9 +341,9 @@ let bar; // this has an asynchronous signature, but calls callback synchronously function someAsyncApiCall(callback) { callback(); } -// the callback is called before `someAsyncApiCall` completes. +// the callback is called before someAsyncApiCall completes. someAsyncApiCall(() => { - // since someAsyncApiCall has completed, bar hasn't been assigned any value + // since someAsyncApiCall hasn't completed, bar hasn't been assigned any value console.log('bar', bar); // undefined }); From 1e7c8784add0ce8788a2fd72e213d9eb23fd1d0a Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 4 Mar 2020 11:05:11 +0200 Subject: [PATCH 2/2] Update event-loop-timers-and-nexttick.md --- locale/en/docs/guides/event-loop-timers-and-nexttick.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/en/docs/guides/event-loop-timers-and-nexttick.md b/locale/en/docs/guides/event-loop-timers-and-nexttick.md index 781a38deb5f87..b2233f87a91ef 100644 --- a/locale/en/docs/guides/event-loop-timers-and-nexttick.md +++ b/locale/en/docs/guides/event-loop-timers-and-nexttick.md @@ -341,7 +341,7 @@ let bar; // this has an asynchronous signature, but calls callback synchronously function someAsyncApiCall(callback) { callback(); } -// the callback is called before someAsyncApiCall completes. +// the callback is called before `someAsyncApiCall` completes. someAsyncApiCall(() => { // since someAsyncApiCall hasn't completed, bar hasn't been assigned any value console.log('bar', bar); // undefined