---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.2
alternate:
  - https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.extend.md
  - https://yandex.ru/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/util.extend.md
  - href: https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.extend.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/dev/jsapi-v2-1/doc/en/llms.txt?revision=r21950234
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/jsapi-v2-1/doc/en/llms.txt?revision=r21950234

# util.extend

Static function.

Function that copies properties from one or several JavaScript objects to another JavaScript object.

```javascript
util.extend(target, ...source)
```

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`target`](#param-target)[*](*star) | — | Type: Object

Target JavaScript object. It will be modified as a result of the function. ||
|| [`source`](#param-source)[*](*star) | — | Type: Object

Source JavaScript object. All of its properties will be copied. There can be several sources (the function can have any number of parameters), and data is copied from right to left (the last argument has highest priority during copying). ||
|#

\* Mandatory parameter/option.

**Example:**

```javascript
var options = ymaps.util.extend({
     prop1: 'a',
     prop2: 'b'
}, {
     prop2: 'c',
     prop3: 'd'
}, {
     prop3: 'e'
});
// We get the result: {
//     prop1: 'a',
//     prop2: 'c',
//     prop3: 'e'
//}
```

[*star]: Mandatory parameter/option.