diff --git a/doc/api/process.md b/doc/api/process.md index 8167bad6ed336c..bd828634a5b143 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1257,9 +1257,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(); ```