title: update a dynamic variable using function in javascript
body: <p>Hi I need help in coding a javascript
  i want to change a dynamic variable using a function, my code is like this </p>
  
  <pre><code>var a=0;
  var b=0;
  
  function UpdateValue(Variable,x)
  
      {
         Variable=x;
  
      }
  
  UpdateValue(a,2);
  UpdateValue(b,3);
  
  console.log("a: ", a); //returns a: 0
  console.log("b: ", b); //returns b: 0 
  </code></pre>
  
  <p>I always get 0 result. the variable does not update
  what's the proper code for my function?</p>