# How jQuery.extend Can Mutate an Existing Object

DevFeed: [How jQuery.extend Can Mutate an Existing Object](<https://devfeed.tech/articles/why-extend-someobj-anotherobj-might-be-dangerous-21163.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2012/07/why-extendsomeobj-anotherobj-might-be/>)

Published: 2012-07-17T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [jQuery](<https://devfeed.tech/topics/jquery.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [function](<https://devfeed.tech/tags/function.md>), [object](<https://devfeed.tech/tags/object.md>), [property](<https://devfeed.tech/tags/property.md>)

## AI overview

This article explains that using jQuery.extend with an existing object as the target can overwrite its properties and cause unintended side effects. It recommends copying values into a new object instead.

## Source excerpt

Lorem ipsum dolor sit amet