p = {x:3, y:4}; p.x = 5; // sets the value of p.x to 5; console.log('p.x = '+ p.x); var a = p.x; // creates value type called 'a' // lets check that 'a' is now independent of p.x p.x = 9; console.log('p.x = '+ p.x); console.log('a = '+ a);
Output: