title: javascript typeof index in the iteration?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
  for (const index in digits) {
    console.log(typeof digits[index]);
    console.log(digits[index]);
  }
  
  
  console.log('========================')
  
  const digitsz = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0];
  for (const indexz in digitsz) {
    console.log(typeof indexz);
    console.log(indexz);
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>ok now the return of the first typeof is number while the second one is string 
  i dont know why is that ?? while in the array its already numbers in there </p>