Skip to content

Commit 3b97de7

Browse files
committed
doc: Rectify error in repl defineCommand tutorial
Fixes: #7357
1 parent cdcfeb7 commit 3b97de7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/repl.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,12 @@ replServer.defineCommand('sayhello', {
312312
action: function(name) {
313313
this.lineParser.reset();
314314
this.bufferedCommand = '';
315-
this.write(`Hello, ${name}!\n`);
315+
console.log(`Hello, ${name}!`);
316316
this.displayPrompt();
317317
}
318318
});
319319
replServer.defineCommand('saybye', function() {
320-
this.write('Goodbye!\n');
320+
console.log('Goodbye!');
321321
this.close();
322322
});
323323
```

0 commit comments

Comments
 (0)