---
name: "up.Params.prototype.add"
area: "API"
kind: "Instance method"
parent: "up.Params class"
url: "https://unpoly.com/api/up.Params.prototype.add"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.Params class](https://unpoly.com/api/up.Params.md)</nav>

# up.Params.prototype.add(name, value)

Adds a new entry with the given `name` and `value`.

An [`up.Params`](https://unpoly.com/api/up.Params.md) instance can hold multiple entries with the same name. To overwrite all existing entries with the given `name`, use [`up.Params#set()`](https://unpoly.com/api/up.Params.prototype.set.md) instead.

## Example {#example}

```js
let params = new up.Params()
params.add('foo', 'fooValue')

let foo = params.get('foo')
// foo is now 'fooValue'
```

---

## Parameters {#parameters}

### name {#name}

(required)

The name of the new entry.

Type: string

### value {#value}

(required)

The value of the new entry.

Type: any

