When I execute this code:
var A_RANDOM_VARIABLE; // I've made it capitalized because it's easier to spot
// in the output
console.log(window);
A_RANDOM_VARIABLE = "I have a value";
I expect to see "undefined" when I click that triangle button to expand the content of the window object. But I actually get the value "I have a value"
What happens here? Could anybody explain it to me?