diff --git a/doc/api/process.md b/doc/api/process.md index 0d0615e2fa7697..e10271060ff5ff 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1243,9 +1243,12 @@ function maybeSync(arg, cb) { This API is hazardous because in the following case: ```js -maybeSync(true, () => { +const maybeTrue = Math.random() > 0.5; + +maybeSync(maybeTrue, () => { foo(); }); + bar(); ```