doc: remove extra spaces and concats in examples
PR-URL: https://github.com/nodejs/node/pull/7885 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
8fbdfb9c4e
commit
6ea8c669df
@ -423,7 +423,7 @@ const addon = require('./build/Release/addon');
|
||||
|
||||
var obj1 = addon('hello');
|
||||
var obj2 = addon('world');
|
||||
console.log(obj1.msg + ' ' + obj2.msg); // 'hello world'
|
||||
console.log(obj1.msg, obj2.msg); // 'hello world'
|
||||
```
|
||||
|
||||
|
||||
|
@ -832,7 +832,7 @@ const spawn = require('child_process').spawn;
|
||||
|
||||
let child = spawn('sh', ['-c',
|
||||
`node -e "setInterval(() => {
|
||||
console.log(process.pid + 'is alive')
|
||||
console.log(process.pid, 'is alive')
|
||||
}, 500);"`
|
||||
], {
|
||||
stdio: ['inherit', 'inherit', 'inherit']
|
||||
|
@ -223,7 +223,7 @@ For example:
|
||||
|
||||
```js
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
console.log("Unhandled Rejection at: Promise ", p, " reason: ", reason);
|
||||
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
|
||||
// application specific logging, throwing an error, or other logic here
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user