Why is it that within Google Chrome, if I open the console and put in the following logic...
function foo() {
console.log( this.bar );
}
var bar = "global";
foo();
...I get "global" as a result for calling foo();
But if I place the same logic into a file called app.js within Visual Studio Code, and from the terminal run node app.js, I get undefined ?
<script>tag and run.'use strict';windowobject is the default context forthis.