Skip to content

Commit 4068d64

Browse files
ChALkeRFishrock123
authored andcommitted
doc: fix EventEmitter#eventNames() example
Replace myErr with myEE in one place. Fix the expected output to have the actual formatting. PR-URL: #6417 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]>
1 parent bfcde97 commit 4068d64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/events.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ myEE.on('bar', () => {});
310310
const sym = Symbol('symbol');
311311
myEE.on(sym, () => {});
312312

313-
console.log(myErr.eventNames());
314-
// Prints ['foo', 'bar', Symbol('symbol')]
313+
console.log(myEE.eventNames());
314+
// Prints [ 'foo', 'bar', Symbol(symbol) ]
315315
```
316316

317317
### emitter.getMaxListeners()

0 commit comments

Comments
 (0)