Skip to content

Commit d584c64

Browse files
akkiFishrock123
authored andcommitted
doc: fix repl defineCommand example
Fixes: #7357 PR-URL: #7365 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 924e4f8 commit d584c64

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)