Skip to content

Commit

Permalink
doc: Rectify error in repl defineCommand tutorial
Browse files Browse the repository at this point in the history
Fixes: #7357
  • Loading branch information
akki committed Jun 22, 2016
1 parent cdcfeb7 commit 3b97de7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
```
Expand Down

0 comments on commit 3b97de7

Please sign in to comment.