---
name: "up.Params.prototype.set"
area: "API"
kind: "Instance method"
parent: "up.Params class"
url: "https://unpoly.com/api/up.Params.prototype.set"
---
<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.set(name, value)

Sets the `value` for the entry with given `name`.

An [`up.Params`](https://unpoly.com/api/up.Params.md) instance can hold multiple entries with the same name. All existing entries with the given `name` are [deleted](https://unpoly.com/api/up.Params.prototype.delete.md) before the new entry is set. To add a new entry even if the `name` is taken, use [`up.Params#add()`](https://unpoly.com/api/up.Params.prototype.add.md).

---

## Parameters {#parameters}

### name {#name}

(required)

The name of the entry to set.

Type: string

### value {#value}

(required)

The new value of the entry.

Type: any

