# ee.List.replace

Replaces the first occurrence of oldval in list with newval.

<br />

| Usage | Returns |
|---|---|
| `List.replace(oldval, newval)` | List |

| Argument | Type | Details |
|---|---|---|
| this: `list` | List |   |
| `oldval` | Object |   |
| `newval` | Object |   |