Skip to content

Commit b33a5a4

Browse files
authored
docs: correct 'undefined' to 'null' in callback example (#8037)
The example comment shows `undefined` but logs `null` due to sync execution. Signed-off-by: Benjamin <127757412+pirateIV@users.noreply.github.com>
1 parent cb0d824 commit b33a5a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/site/pages/en/learn/asynchronous-work/event-loop-timers-and-nexttick.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ function someAsyncApiCall(callback) {
347347
// the callback is called before `someAsyncApiCall` completes.
348348
someAsyncApiCall(() => {
349349
// since someAsyncApiCall hasn't completed, bar hasn't been assigned any value
350-
console.log('bar', bar); // undefined
350+
console.log('bar', bar); // null
351351
});
352352

353353
bar = 1;

0 commit comments

Comments
 (0)