title: Increasing index of array doesn't work when it's stored as global variable
body: <p>I'm trying to update array index as function incIndex runs:</p>
  
  <pre><code>const arr=[1, 2, 3, 4, 5];
  let index = 0;
  let arrIndex = arr[index]
  const incIndex = () =&gt; index++;
  </code></pre>
  
  <p>but it only works this way</p>
  
  <pre><code>console.log(arr[index]) // 1
  incIndex();
  console.log(arr[index]) // 2
  </code></pre>
  
  <p>but when I do </p>
  
  <pre><code>console.log(arrIndex) // 1
  incIndex();
  console.log(arrIndex) // 1
  </code></pre>
  
  <p>I still get element of index 0. Does anyone know how to fix it so I can use 2nd way?</p>