From 3b97de70607cc7be0e5f358c0731271acad3c17a Mon Sep 17 00:00:00 2001 From: Akshesh Date: Wed, 22 Jun 2016 16:29:26 +0530 Subject: [PATCH] doc: Rectify error in repl defineCommand tutorial Fixes: https://github.com/nodejs/node/issues/7357 --- doc/api/repl.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); }); ```