Skip to content

Commit

Permalink
doc: fix repl defineCommand example
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
akki authored and Fishrock123 committed Jun 27, 2016
1 parent 924e4f8 commit d584c64
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 d584c64

Please sign in to comment.