Skip to content

Commit

Permalink
doc: fix print results in events
Browse files Browse the repository at this point in the history
PR-URL: nodejs#49548
Refs: nodejs#49537
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
  • Loading branch information
Jungku Lee authored and alexfernandez committed Nov 1, 2023
1 parent 11f4cce commit ce0709f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class MyEmitter extends EventEmitter {}
const myEmitter = new MyEmitter();
myEmitter.on('event', (a, b) => {
console.log(a, b, this);
// Prints: a b {}
// Prints: a b undefined
});
myEmitter.emit('event', 'a', 'b');
```
Expand Down

0 comments on commit ce0709f

Please sign in to comment.