title: Google apps script - variable reset during iteration
body: <p>I would expect global variable iii to increment but iii remains = 1 throughout until max stack size reached.</p>
  <pre><code>var iii = 1; //this is supposed to be global variable declaration in google apps script
  
  function tryglobal() {
    for (iii = 1; iii &lt; 100; iii++)  {
      console.log(iii);
      iii = iii*2;
      tryglobal();
    }
  }
  </code></pre>
  <p>but iii always remain 1 till stack overflow in google apps script.</p>
  <p>Why so? Is it due to processing of each iteration seperately?</p>