---
title: "javascript源对象于对象引用之前不得不说的事情"
author: "xjw1987524"
date: "2014-09-13T17:05:07Z"
tags: []
categories: ["Web前端"]
slug: "javascript"
draft: false
lastmod: "2014-09-13T17:05:07Z"
id: 2116126
url: "https://fishlovefly.iteye.com/blog/2116126"
---

```
var  source = {"a":3,"b":4};//源对象


var  cpsource = source;


cpsource.c = 5;


//source.c 输出的是5



cpsource = {"c":5};


source.c //输出的是undefined


//引用对象只能对源对象进行扩展而不能进行修改


```