Underscore.js _.extend() Function (original) (raw)

Last Updated : 14 Jan, 2024

Underscore.js **_.extend() function is used to create a copy of all of the properties of the source objects over the destination object and return the destination object. The nested arrays or objects will be copied by using reference, not duplicated.

**Syntax:

_.extend(destination, *sources);

**Parameters:

**Return Value:

It returns a copy of all of the properties of the source objects over the destination object and returns the destination object.

**Example 1: In this example, we are using the Underscore.js **_.extend() function.

html `