diff --git a/doc/api/repl.md b/doc/api/repl.md index 7524a373eea366..9d44a701fc379d 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -312,12 +312,12 @@ replServer.defineCommand('sayhello', { action: function(name) { this.lineParser.reset(); this.bufferedCommand = ''; - this.write(`Hello, ${name}!\n`); + console.log(`Hello, ${name}!`); this.displayPrompt(); } }); replServer.defineCommand('saybye', function() { - this.write('Goodbye!\n'); + console.log('Goodbye!'); this.close(); }); ```