title: Javascript - How change object properties without reassign them
body: <p>The snippet below exposes the doubt</p>
  
  <pre><code>var foo = 'something'
  var baz = 'other thing'
  
  var obj = {
    prop1 : 'my prop',
    prop2 : foo,        //referencing external variable
    prop3 : baz         //referencing external variable
  }
  
  // here we get the expected obj to be printed
  console.log(obj)
  
  // now I change one of the initial variable
  foo = 'changed'
  
  // here we get the sabe print as the first, that is the ~problem~   
  console.log(obj)
  </code></pre>
  
  <p>So, how to print 'changed' on prop2 without reassign  <code>obj.prop2 = foo</code> </p>