---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# Set.prototype.add()

The **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.

## Syntax

```js
add(value)
```

### Parameters

- `value`
  - : The value of the element to add to the `Set` object.

### Return value

The `Set` object with added value.
