> ## 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)`

<Badge color="green">{"✓"} Prebuilt</Badge> <Badge color="green">{"✓"} Custom</Badge>

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()`](/reference/daily-js/instance-methods/on) or [`once()`](/reference/daily-js/instance-methods/once).

Returns `this`, so calls can be chained.

## Parameters

<ParamField body="eventName" type="DailyEvent" required>
  The event name to unsubscribe from.
</ParamField>

<ParamField body="callback" type="function" required>
  The exact function reference that was registered with `on()` or `once()`.
</ParamField>

## 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

<CardGroup>
  <Card title="Methods" icon="code" iconType="solid">
    * [on()](/reference/daily-js/instance-methods/on)
    * [once()](/reference/daily-js/instance-methods/once)
  </Card>

  <Card title="Guides" icon="book-open" iconType="solid">
    * [Events](/docs/daily-js/concepts/events)
  </Card>
</CardGroup>
