日期:2014-05-16 浏览次数:20305 次
change to the copy. As a result, the original object is also changed: >>> var original = {howmany: 1}; >>> var copy = original; >>> copy.howmany 1 >>> copy.howmany = 100; 100 >>> original.howmany 100
>>> var fido = {breed: 'dog'}; >>> var benji = {breed: 'dog'}; Comparing them will return false: >>> benji === fido false >>> benji == fido false