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 <[email protected]>
Reviewed-By: Brian White <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
akki authored and Fishrock123 committed Jul 5, 2016
1 parent 029af2c commit a04cd85
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 a04cd85

Please sign in to comment.