doc: fix confusing example in process.md

PR-URL: https://github.com/nodejs/node/pull/12282
Fixes: https://github.com/nodejs/node/issues/12280
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
pull/12307/head
Vse Mozhet Byt 2017-04-08 16:22:25 +03:00
parent fe016c6cd9
commit b2a12ee782
1 changed files with 4 additions and 1 deletions

View File

@ -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();
```