title: Array .Push not adding to end of Array
body: <p>When editing a cell and logging the output of the Array, PUSH function has not added the newly edited cell to the end of the array; it only outputs one element, almost as though it's recreating the array each time you edit a cell.</p>
  
  <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>var EnteredDates = [];
  
  function OnEdit(e){
  var range = e.range;
  
  EnteredDates.push([range.getValue(),range.getA1Notation()]);
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I've tried searching the stack overflow questions. but can't see this exact problem of an array being re-created when pushing.</p>
  
  <p>I've also tried initiating the Array as a Global variable and also, instead, initiated it inside OnOpen Function. Both don't work.</p>
  
  <p>Additionally I've also removed initiating it as a Global Variable incase it is always being initiated on code being run and tried the following; when logging the EnteredDates array it still only shows the latest entry.</p>
  
  <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>if (!Array.isArray(EnteredDates)) {
     var EnteredDates = [];
  }
                  
  EnteredDates.push([range.getValue(),range.getA1Notation()]);
  Logger.log(EnteredDates);</code></pre>
  </div>
  </div>
  </p>