title: Different output with node and "Run code snippet" from stackoverflow in js
body: <p>I have a file in c:\jsdev\ folder called <code>script.js</code></p>
  <p>with this source code:</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>const arr = [3, 'myStr', 5, 7];
  arr.foo = 'hello';
  
  for (let i in arr) {
    console.log(i); // logs "0", "1", "2", "foo"
  }
  
  console.log(arr);</code></pre>
  </div>
  </div>
  </p>
  <p>When I run this in cmd</p>
  <pre><code>c:\jsdev&gt;node script.js
  </code></pre>
  <p>I get following output</p>
  <pre><code>0
  1
  2
  3
  foo
  [ 3, 'myStr', 5, 7, foo: 'hello' ]
  </code></pre>
  <p><a href="https://i.stack.imgur.com/zoVdI.png" rel="nofollow noreferrer">Picture of my cmd shell in Windows 10</a></p>
  <p>But when I press the <code>Run code snippet</code> (try it out now in stackoverflow), it just outputs</p>
  <pre><code>[ 3, 'myStr', 5, 7 ]
  </code></pre>