diff --git a/doc/api/events.md b/doc/api/events.md index b0be1d9b8499b8..329d763b87065d 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1455,8 +1455,7 @@ async function foo(emitter, event, signal) { } foo(ee, 'foo', ac.signal); -ac.abort(); // Abort waiting for the event -ee.emit('foo'); // Prints: Waiting for the event was canceled! +ac.abort(); // Prints: Waiting for the event was canceled! ``` ```cjs @@ -1479,8 +1478,7 @@ async function foo(emitter, event, signal) { } foo(ee, 'foo', ac.signal); -ac.abort(); // Abort waiting for the event -ee.emit('foo'); // Prints: Waiting for the event was canceled! +ac.abort(); // Prints: Waiting for the event was canceled! ``` ### Awaiting multiple events emitted on `process.nextTick()`