title: Bind the values of diffrent elements in an array (JavaScript)
body: <p>Problem:
  I want to bind the values in an array in a way that when I change one value the other one will change aswell and vice versa.</p>
  
  <pre><code>var array = [1,2,3,1];
  array[0] = array[3];
  array[0] = 7;
  console.log(array[3]) //this will give 1 and I need 7 here.
  </code></pre>
  
  <p>I figured out a way to do this with objects, but it is not as clean as I would like it to be. My friend told me there was no way this could be done but I doubt it.</p>