¡@

Home 

javascript Programming Glossary: child.x

Crockford's Prototypal inheritance - Issues with nested objects

http://stackoverflow.com/questions/10131052/crockfords-prototypal-inheritance-issues-with-nested-objects

you do var parent x a 0 var child Object.create parent child.x will be referencing the same object as parent.x that one a 0.. object. And when you change a property of it var prop_val child.x parent.x prop_val.a 1 both will be affected. To change a nested.. you first will have to create an independent object child.x a 0 child.x.a 1 parent.x.a still 0 What you can do is child.x..