Skip to content

Commit

Permalink
doc: use const consistently
Browse files Browse the repository at this point in the history
events.markdown uses `var` and `const` in different places seemingly
arbitrarily. This change makes it favor const when possible.
  • Loading branch information
Trott committed Dec 5, 2015
1 parent cc2ceb6 commit 6c2652e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/events.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ attached to.
Use `require('events')` to access the EventEmitter class.

```javascript
var EventEmitter = require('events');
const EventEmitter = require('events');
```

When an `EventEmitter` instance experiences an error, the typical action is
Expand Down Expand Up @@ -164,7 +164,7 @@ Returns emitter, so calls can be chained.
Removes a listener from the listener array for the specified event.
**Caution**: changes array indices in the listener array behind the listener.

var callback = function(stream) {
const callback = function(stream) {
console.log('someone connected!');
};
server.on('connection', callback);
Expand Down

0 comments on commit 6c2652e

Please sign in to comment.