> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# off()

> Removes an event listener from a Daily call event.

`off(eventName, callback)`

✓ Prebuilt✓ Custom

Removes a previously registered event listener. Follows the Node.js [`EventEmitter`](https://nodejs.org/api/events.html#events_class_eventemitter) interface. The `callback` must be the same function reference passed to [`on()`](https://docs.daily.co/reference/daily-js/instance-methods/on) or [`once()`](https://docs.daily.co/reference/daily-js/instance-methods/once).

Returns `this`, so calls can be chained.

## Parameters

**eventName** `DailyEvent` *required*

The event name to unsubscribe from.

**callback** `function` *required*

The exact function reference that was registered with `on()` or `once()`.

## Return value

Returns `this` (the `DailyCall` instance) for chaining.

## Example

```javascript theme={null}
function handleParticipantJoined({ participant }) {
  console.log('Joined:', participant.user_name);
}

call.on('participant-joined', handleParticipantJoined);

// Later, remove the listener
call.off('participant-joined', handleParticipantJoined);
```

## See also

> [card] Methods
>
> * [on()](https://docs.daily.co/reference/daily-js/instance-methods/on.md)
> * [once()](https://docs.daily.co/reference/daily-js/instance-methods/once.md)

> [card] Guides
>
> * [Events](https://docs.daily.co/docs/daily-js/concepts/events.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.