title: Copy a variable's value into another
body: <p>I have a variable which has a JSON object as its value. I directly assign this variable to some other variable so that they share the same value. This is how it works:</p>
  
  <pre><code>var a = $('#some_hidden_var').val(),
      b = a;
  </code></pre>
  
  <p>This works and both have the same value. I use a <code>mousemove</code> event handler to update <code>b</code> through out my app. On a button click, I want to revert <code>b</code> to the original value, meaning the value stored in <code>a</code>.</p>
  
  <pre><code>$('#revert').on('click', function(e){
      b = a;
  });
  </code></pre>
  
  <p>After this if I use the same <code>mousemove</code> event handler, it updates both <code>a</code> and <code>b</code>, when earlier it was updating only <code>b</code> as expected.</p>
  
  <p>I'm stumped over this issue! What is wrong here?</p>