Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var o = {
- x:1
- };
- var two = Object.create(o);
- console.log("o " + o.x); // => 1
- console.log("two " + two.x); // => 1
- o.x = 2;
- console.log("o " + o.x); // => 2
- console.log("two " + two.x); // => 2
- two.x = 3;
- console.log("o " + o.x); // => 2
- console.log("two " + two.x); // => 3
Add Comment
Please, Sign In to add comment