title: pass a variable inside an array to update that variable dynamically - in Vue.js
body: <p>i'm trying to change variables dynamically so as not to use too many switch statements. i was hoping to do this:</p>
  
  <pre><code>this.variable1 = 2
  this.variable2 = 3
  
  var array1 = [this.variable1, this.variable2]
  </code></pre>
  
  <p>and then later do</p>
  
  <pre><code>array1[0] = 25
  array1[1] = 12
  
  console.log(array1[0]) //would output 25
  console.log(array1[1]) // would output 12
  </code></pre>
  
  <p>of course it this is not what happens which is normal but how can i achieve that dynamically? There must be a way i'm sure.</p>