Skip to content

Commit

Permalink
doc: don't use "interface" as a variable name
Browse files Browse the repository at this point in the history
In readline.markdown, don't use strict mode reserved keyword "interface"
as a variable name.

This commit changes the name of one `readline.Interface` instance from
"interface" to "rl", as it is named in other places of the doc.

PR-URL: nodejs#4900
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
  • Loading branch information
ChALkeR authored and Michael Scovetta committed Apr 2, 2016
1 parent a3d6a05 commit d3924c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/readline.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ nothing is displayed.
Example usage:

```js
interface.question('What is your favorite food?', (answer) => {
rl.question('What is your favorite food?', (answer) => {
console.log(`Oh, so your favorite food is ${answer}`);
});
```
Expand Down

0 comments on commit d3924c5

Please sign in to comment.