summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-04-08 16:22:25 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-04-10 16:16:44 +0300
commitb2a12ee78243e24670744461b8e95469524a6eb3 (patch)
tree94794769c6e5875bfb59f526c7598fd1c190e892 /doc
parentfe016c6cd99cb8e57fbeaf6dbb8b7c28f2cfeafd (diff)
downloadandroid-node-v8-b2a12ee78243e24670744461b8e95469524a6eb3.tar.gz
android-node-v8-b2a12ee78243e24670744461b8e95469524a6eb3.tar.bz2
android-node-v8-b2a12ee78243e24670744461b8e95469524a6eb3.zip
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>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/process.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/api/process.md b/doc/api/process.md
index 760cd4dd15..e351d3cce7 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();
```