---
title: set:intersection()
slug: Web/EXSLT/set/intersection
tags:
  - EXSLT
  - NeedsSpecTable
  - Reference
---
{{XSLTRef}}{{QuickLinksWithSubpages("/en-US/docs/Web/EXSLT")}}

`set:intersection()` returns the intersection of two node-sets. In other words, it returns a node-set containing all the nodes that exits in both `nodeSet1` and `nodeSet2`.

## Syntax

```js
set:intersection(nodeSet1, nodeSet2)
```

### Arguments

- `nodeSet1`
  - : The first node-set.
- `nodeSet2`
  - : The second node-set.

### Returns

A node-set containing the nodes that existed in both `nodeSet1` and in `nodeSet2`.

## Specifications

[EXSLT - SET:INTERSECTION](http://www.exslt.org/set/functions/intersection/index.html)
