From d584c64c0beb1059af2aa1898ac5e4b5dab4ca80 Mon Sep 17 00:00:00 2001 From: akki Date: Thu, 23 Jun 2016 23:18:59 +0530 Subject: [PATCH] doc: fix repl defineCommand example Fixes: https://github.com/nodejs/node/issues/7357 PR-URL: https://github.com/nodejs/node/pull/7365 Reviewed-By: Colin Ihrig Reviewed-By: Brian White Reviewed-By: James M Snell --- 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(); }); ```