title: How to link a javascript object property to another property of the same object?
body: <p>Is there a way to link the value of one object property to the value of another?</p>
  
  <p>The idea is, that I have something like an excepted interface so I need the <code>propertys.name</code> and <code>.value</code> for my obj. In this special case name is easily constructed from value (value is an array and name is <code>array.toString()</code>)</p>
  
  <p>I could use <code>obj.value.toString()</code> instead of value but the code needs to use <code>obj.name</code> to make it work for all cases.</p>
  
  <p>I tried this code, but it does not produce the result I want. How could I achieve the desired behavior?</p>
  
  <pre><code>obj = {value: array, name: this.value.toString()}
  </code></pre>