Created
June 17, 2015 15:46
-
-
Save balazs/7de72ff970896fcfe883 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
o = {} | |
Object {} | |
var struct = { content: [1,2,3] } | |
undefined | |
Object.defineProperty(o, 'ref', {value: struct, writable: false}) | |
Object {ref: Object} | |
var s2 = o.ref | |
undefined | |
s2 | |
Object {content: Array[3]}content: Array[3]__proto__: Object | |
s2.content[0] | |
1 | |
s2.content[0] = 2 | |
2 | |
s2.content[0] | |
2 | |
struct.content[0] | |
2 | |
o.ref.content[0] | |
2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment