diff --git a/doc/api/events.md b/doc/api/events.md index d8f8ee7e7c6582..5c6b058123ca57 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -858,8 +858,8 @@ const { getEventListeners, EventEmitter } = require('events'); { const et = new EventTarget(); const listener = () => console.log('Events are fun'); - ee.addEventListener('foo', listener); - getEventListeners(ee, 'foo'); // [listener] + et.addEventListener('foo', listener); + getEventListeners(et, 'foo'); // [listener] } ```