diff --git a/doc/api/process.md b/doc/api/process.md index 760cd4dd15f..e351d3cce76 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1256,9 +1256,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(); ```